import type { ComponentMeta } from '@storybook/react'; import type { EditorState } from 'lexical'; import { useState } from 'react'; import initialEditorState from './initialEditorState.json'; import type { RichTextEditorProps } from './RichTextEditor'; import RichTextEditor from './RichTextEditor'; export default { argTypes: { editable: { control: false }, initialEditorState: { control: 'text' }, inputClassname: { control: 'text' }, minInputHeight: { control: 'number' }, namespace: { control: 'text' }, placeholder: { control: 'text' } }, component: RichTextEditor, title: 'RichTextEditor' } as ComponentMeta; const Template = (props: RichTextEditorProps): JSX.Element => ( ); export const normal = Template.bind({}); export const withCustomEditorMinHeight = Template.bind({}); withCustomEditorMinHeight.args = { minInputHeight: 300 }; const StoryWithUpdateListener = (): JSX.Element => { const [editorState, setEditorState] = useState(); return (