From 2f5bea27b1ddaa12af77a42678d94b0569739627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 23 Apr 2020 21:39:08 +0200 Subject: [PATCH] NewDataSourcePage: Restore signature badge lost in merge (#23832) --- public/app/core/components/Card/Card.tsx | 13 ++++++- .../datasources/NewDataSourcePage.tsx | 35 +++++-------------- 2 files changed, 20 insertions(+), 28 deletions(-) diff --git a/public/app/core/components/Card/Card.tsx b/public/app/core/components/Card/Card.tsx index 0a1ee07f175..54a679fa0fa 100644 --- a/public/app/core/components/Card/Card.tsx +++ b/public/app/core/components/Card/Card.tsx @@ -5,13 +5,23 @@ export interface CardProps { logoUrl?: string; title: string; description?: string; + labels?: React.ReactNode; actions?: React.ReactNode; onClick?: () => void; ariaLabel?: string; className?: string; } -export const Card: React.FC = ({ logoUrl, title, description, actions, onClick, ariaLabel, className }) => { +export const Card: React.FC = ({ + logoUrl, + title, + description, + labels, + actions, + onClick, + ariaLabel, + className, +}) => { const mainClassName = cx('add-data-source-item', className); return ( @@ -20,6 +30,7 @@ export const Card: React.FC = ({ logoUrl, title, description, actions
{title} {description && {description}} + {labels &&
{labels}
}
{actions &&
{actions}
} diff --git a/public/app/features/datasources/NewDataSourcePage.tsx b/public/app/features/datasources/NewDataSourcePage.tsx index 09b7e00dc3c..647a0356151 100644 --- a/public/app/features/datasources/NewDataSourcePage.tsx +++ b/public/app/features/datasources/NewDataSourcePage.tsx @@ -145,36 +145,17 @@ const DataSourceTypeCard: FC = props => { {!isPhantom && } } - className={isPhantom && 'add-data-source-item--phantom'} - onClick={onClick} - aria-label={e2e.pages.AddDataSource.selectors.dataSourcePlugins(plugin.name)} - > - -
- {plugin.name} - {plugin.info.description && {plugin.info.description}} - {!isPhantom && ( + labels={ + !isPhantom && (
- )} -
-
- {learnMoreLink && ( - - {learnMoreLink.name} - - )} - {!isPhantom && } -
- + ) + } + className={isPhantom && 'add-data-source-item--phantom'} + onClick={onClick} + aria-label={e2e.pages.AddDataSource.selectors.dataSourcePlugins(plugin.name)} + /> ); };