mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
* Add and configure eslint-plugin-import * Fix the lint:ts npm command * Autofix + prettier all the files * Manually fix remaining files * Move jquery code in jest-setup to external file to safely reorder imports * Resolve issue caused by circular dependencies within Prometheus * Update .betterer.results * Fix missing // @ts-ignore * ignore iconBundle.ts * Fix missing // @ts-ignore
32 lines
840 B
TypeScript
32 lines
840 B
TypeScript
import { css } from '@emotion/css';
|
|
import React, { FC } from 'react';
|
|
|
|
import { Modal, stylesFactory } from '@grafana/ui';
|
|
|
|
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;
|
|
`,
|
|
};
|
|
});
|