RuleLocation.tsx 381 B

12345678910111213141516171819202122
  1. import React, { FC } from 'react';
  2. import { Icon } from '@grafana/ui';
  3. interface RuleLocationProps {
  4. namespace: string;
  5. group?: string;
  6. }
  7. const RuleLocation: FC<RuleLocationProps> = ({ namespace, group }) => {
  8. if (!group) {
  9. return <>{namespace}</>;
  10. }
  11. return (
  12. <>
  13. {namespace} <Icon name="angle-right" /> {group}
  14. </>
  15. );
  16. };
  17. export { RuleLocation };