Files
Hugo Häggmark 119d5897ea i18n: imports use @grafana/i18n (#105177)
* 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
2025-05-15 09:17:14 +02:00

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)}`,
}),
});