diff --git a/packages/grafana-ui/src/components/Badge/Badge.tsx b/packages/grafana-ui/src/components/Badge/Badge.tsx index d68c504bd26..26d8982fa22 100644 --- a/packages/grafana-ui/src/components/Badge/Badge.tsx +++ b/packages/grafana-ui/src/components/Badge/Badge.tsx @@ -49,23 +49,23 @@ const getStyles = stylesFactory((theme: GrafanaTheme, color: BadgeColor) => { if (theme.isDark) { bgColor = tinycolor(sourceColor) - .darken(38) + .setAlpha(0.1) .toString(); borderColor = tinycolor(sourceColor) - .darken(25) + .darken(35) .toString(); textColor = tinycolor(sourceColor) - .lighten(45) + .lighten(15) .toString(); } else { bgColor = tinycolor(sourceColor) - .lighten(30) + .setAlpha(0.1) .toString(); borderColor = tinycolor(sourceColor) - .lighten(15) + .lighten(25) .toString(); textColor = tinycolor(sourceColor) - .darken(40) + .darken(15) .toString(); } @@ -75,7 +75,6 @@ const getStyles = stylesFactory((theme: GrafanaTheme, color: BadgeColor) => { display: inline-flex; padding: 1px 4px; border-radius: 3px; - margin-top: 6px; background: ${bgColor}; border: 1px solid ${borderColor}; color: ${textColor}; diff --git a/public/app/core/components/Card/Card.tsx b/public/app/core/components/Card/Card.tsx index 54a679fa0fa..93945b0cf9a 100644 --- a/public/app/core/components/Card/Card.tsx +++ b/public/app/core/components/Card/Card.tsx @@ -30,7 +30,7 @@ export const Card: React.FC = ({
{title} {description && {description}} - {labels &&
{labels}
} + {labels &&
{labels}
}
{actions &&
{actions}
} diff --git a/public/app/features/dashboard/components/VizTypePicker/VizTypePickerPlugin.tsx b/public/app/features/dashboard/components/VizTypePicker/VizTypePickerPlugin.tsx index ea4cbeb7b4d..0aae381c55e 100644 --- a/public/app/features/dashboard/components/VizTypePicker/VizTypePickerPlugin.tsx +++ b/public/app/features/dashboard/components/VizTypePicker/VizTypePickerPlugin.tsx @@ -121,6 +121,7 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => { `, badge: css` position: absolute; + background: ${theme.colors.bg2}; bottom: ${theme.spacing.xs}; right: ${theme.spacing.xs}; z-index: 1; diff --git a/public/app/features/datasources/NewDataSourcePage.tsx b/public/app/features/datasources/NewDataSourcePage.tsx index 0f52e71370d..7309c2ed7b0 100644 --- a/public/app/features/datasources/NewDataSourcePage.tsx +++ b/public/app/features/datasources/NewDataSourcePage.tsx @@ -156,13 +156,7 @@ const DataSourceTypeCard: FC = props => { {!isPhantom && } } - labels={ - !isPhantom && ( -
- -
- ) - } + labels={!isPhantom && } className={isPhantom ? 'add-data-source-item--phantom' : ''} onClick={onClick} aria-label={selectors.pages.AddDataSource.dataSourcePlugins(plugin.name)} diff --git a/public/app/features/plugins/PluginListItem.tsx b/public/app/features/plugins/PluginListItem.tsx index e31f25f8bc4..9eab738efee 100644 --- a/public/app/features/plugins/PluginListItem.tsx +++ b/public/app/features/plugins/PluginListItem.tsx @@ -15,7 +15,9 @@ const PluginListItem: FC = props => {
{plugin.type}
- +
+ +
{plugin.hasUpdate && (
Update available! diff --git a/public/app/features/plugins/__snapshots__/PluginListItem.test.tsx.snap b/public/app/features/plugins/__snapshots__/PluginListItem.test.tsx.snap index 14b64855a9b..05fcd88c55d 100644 --- a/public/app/features/plugins/__snapshots__/PluginListItem.test.tsx.snap +++ b/public/app/features/plugins/__snapshots__/PluginListItem.test.tsx.snap @@ -17,7 +17,11 @@ exports[`Render should render component 1`] = ` > panel
- +
+ +
panel
- +
+ +
diff --git a/public/sass/components/_add_data_source.scss b/public/sass/components/_add_data_source.scss index a9f4d8a30bc..5e574e43e9a 100644 --- a/public/sass/components/_add_data_source.scss +++ b/public/sass/components/_add_data_source.scss @@ -53,6 +53,10 @@ color: $text-color-weak; } +.add-data-source-item-badge { + margin-top: 6px; +} + .add-data-source-item-text { font-size: $font-size-h5; } diff --git a/public/sass/components/_cards.scss b/public/sass/components/_cards.scss index 9861030abd9..44c56ccc4e7 100644 --- a/public/sass/components/_cards.scss +++ b/public/sass/components/_cards.scss @@ -84,6 +84,10 @@ font-weight: $font-weight-semi-bold; } +.card-item-badge { + margin: 6px 0; +} + .card-item-notice { font-size: $font-size-sm; }