mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
16 lines
505 B
TypeScript
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} />
|
||
|
|
);
|