You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
839 B
30 lines
839 B
import React, { FC } from 'react';
|
|
import { Modal, stylesFactory } from '@grafana/ui';
|
|
import { css } from '@emotion/css';
|
|
|
|
import { OnRowOptionsUpdate, RowOptionsForm } from './RowOptionsForm';
|
|
|
|
export interface RowOptionsModalProps {
|
|
title: string;
|
|
repeat?: string | null;
|
|
onDismiss: () => void;
|
|
onUpdate: OnRowOptionsUpdate;
|
|
}
|
|
|
|
export const RowOptionsModal: FC<RowOptionsModalProps> = ({ repeat, title, onDismiss, onUpdate }) => {
|
|
const styles = getStyles();
|
|
return (
|
|
<Modal isOpen={true} title="Row options" icon="copy" onDismiss={onDismiss} className={styles.modal}>
|
|
<RowOptionsForm repeat={repeat} title={title} onCancel={onDismiss} onUpdate={onUpdate} />
|
|
</Modal>
|
|
);
|
|
};
|
|
|
|
const getStyles = stylesFactory(() => {
|
|
return {
|
|
modal: css`
|
|
label: RowOptionsModal;
|
|
width: 500px;
|
|
`,
|
|
};
|
|
});
|
|
|