import * as React from 'react'; import { t } from '@grafana/i18n'; import { Icon, ModalsController } from '@grafana/ui'; import { OnRowOptionsUpdate } from './RowOptionsForm'; import { RowOptionsModal } from './RowOptionsModal'; export interface RowOptionsButtonProps { title: string; repeat?: string; onUpdate: OnRowOptionsUpdate; warning?: React.ReactNode; } export const RowOptionsButton = ({ repeat, title, onUpdate, warning }: RowOptionsButtonProps) => { const onUpdateChange = (hideModal: () => void) => (title: string, repeat?: string | null) => { onUpdate(title, repeat); hideModal(); }; return ( {({ showModal, hideModal }) => { return ( ); }} ); }; RowOptionsButton.displayName = 'RowOptionsButton';