Files
grafana/public/app/features/alerting/unified/components/RuleLocation.tsx
Tobias Skarhed f1f02207f2 Alerting: Improve heading accessibility (#85723)
* Change from h5 to Text component

* Fix goworksum error

* Add headings for contact points and notification policies

* Alert group h2

* Reset labels and move h2 to group by

---------

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2024-04-12 16:19:47 +02:00

27 lines
468 B
TypeScript

import React from 'react';
import { Icon, Text } from '@grafana/ui';
interface Props {
namespace: string;
group?: string;
}
const RuleLocation = ({ namespace, group }: Props) => {
if (!group) {
return (
<Text element="h3" variant="body">
{namespace}
</Text>
);
}
return (
<Text element="h3" variant="body">
{namespace} <Icon name="angle-right" aria-label=">" /> {group}
</Text>
);
};
export { RuleLocation };