mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 04:52:24 +08:00

* i18n: everything should target @grafana/i18n * wip * chore: updates after PR feedback * Trigger build * Trigger build * Trigger build * chore: skip flaky tests * chore: skip flaky tests * chore: skip flaky tests * chore: skip flaky tests * chore: skip flaky tests * chore: skip flaky tests * chore: revert all flaky tests * chore: some incorrect usages of useTranslate
27 lines
672 B
TypeScript
27 lines
672 B
TypeScript
import { css } from '@emotion/css';
|
|
|
|
import { GrafanaTheme2 } from '@grafana/data';
|
|
import { Trans } from '@grafana/i18n';
|
|
import { useStyles2 } from '@grafana/ui';
|
|
|
|
export function ToLabel() {
|
|
const styles = useStyles2(getStyles);
|
|
return (
|
|
<div className={styles.button}>
|
|
<Trans i18nKey="alerting.threshold.to">TO</Trans>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
const getStyles = (theme: GrafanaTheme2) => ({
|
|
button: css({
|
|
height: '32px',
|
|
color: theme.colors.primary.text,
|
|
fontSize: theme.typography.bodySmall.fontSize,
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
fontWeight: theme.typography.fontWeightBold,
|
|
padding: `0 ${theme.spacing(1)}`,
|
|
}),
|
|
});
|