Files
grafana/public/app/features/alerting/unified/components/rule-editor/RuleFolderPicker.tsx
2021-04-14 15:57:36 +03:00

16 lines
505 B
TypeScript

import React, { FC } from 'react';
import { FolderPicker, Props as FolderPickerProps } from 'app/core/components/Select/FolderPicker';
export interface Folder {
title: string;
id: number;
}
export interface Props extends Omit<FolderPickerProps, 'initiailTitle' | 'initialFolderId'> {
value?: Folder;
}
export const RuleFolderPicker: FC<Props> = ({ value, ...props }) => (
<FolderPicker showRoot={false} allowEmpty={true} initialTitle={value?.title} initialFolderId={value?.id} {...props} />
);