diff --git a/public/app/features/alerting/unified/components/MetaText.tsx b/public/app/features/alerting/unified/components/MetaText.tsx index c02e6bd88f9..3c1ed4a348a 100644 --- a/public/app/features/alerting/unified/components/MetaText.tsx +++ b/public/app/features/alerting/unified/components/MetaText.tsx @@ -1,46 +1,40 @@ -import { css } from '@emotion/css'; -import classNames from 'classnames'; -import React, { HTMLAttributes } from 'react'; +import { css, cx } from '@emotion/css'; +import React, { ComponentProps, HTMLAttributes } from 'react'; -import { GrafanaTheme2 } from '@grafana/data'; import { Stack } from '@grafana/experimental'; import { Icon, IconName, useStyles2 } from '@grafana/ui'; +import { Span } from '@grafana/ui/src/unstable'; interface Props extends HTMLAttributes { icon?: IconName; + color?: ComponentProps['color']; } -const MetaText = ({ children, icon, ...rest }: Props) => { +const MetaText = ({ children, icon, color = 'secondary', ...rest }: Props) => { const styles = useStyles2(getStyles); const interactive = typeof rest.onClick === 'function'; return (
- - {icon && } - {children} - + + + {icon && } + {children} + +
); }; -const getStyles = (theme: GrafanaTheme2) => ({ - metaText: css` - font-size: ${theme.typography.bodySmall.fontSize}; - color: ${theme.colors.text.secondary}; - `, +const getStyles = () => ({ interactive: css` cursor: pointer; - - &:hover { - color: ${theme.colors.text.primary}; - } `, });