mirror of
https://github.com/grafana/grafana.git
synced 2025-09-19 20:23:26 +08:00
23 lines
345 B
TypeScript
23 lines
345 B
TypeScript
import React from 'react';
|
|
|
|
import { Icon } from '@grafana/ui';
|
|
|
|
interface Props {
|
|
namespace: string;
|
|
group?: string;
|
|
}
|
|
|
|
const RuleLocation = ({ namespace, group }: Props) => {
|
|
if (!group) {
|
|
return <>{namespace}</>;
|
|
}
|
|
|
|
return (
|
|
<>
|
|
{namespace} <Icon name="angle-right" /> {group}
|
|
</>
|
|
);
|
|
};
|
|
|
|
export { RuleLocation };
|