diff --git a/apps/design-system/src/components/VisualJsonSchemaEditor.stories.tsx b/apps/design-system/src/components/VisualJsonSchemaEditor.stories.tsx new file mode 100644 index 000000000..394eeabae --- /dev/null +++ b/apps/design-system/src/components/VisualJsonSchemaEditor.stories.tsx @@ -0,0 +1,284 @@ +import React, { useState } from 'react'; +import { VisualEditor, CodeEditor, Examples } from '@asyncapi/studio-ui'; + +export default { + component: VisualEditor, + parameters: { + layout: 'fullscreen', + }, +}; +type TemplateProps = { + initialSchema: string; +}; + +const Template: React.FC = ({ initialSchema }) => { + const [schema, setSchema] = useState(initialSchema); + const [editorType, setEditorType] = useState<'visual' | 'code' | 'examples'>('visual'); + + + return ( +
+
+ + + +
+
+ {editorType === 'visual' && ( + + )} + {editorType === 'code' && ( + + )} + {editorType === 'examples' && ( + + )} +
+
+ ); +}; + +export const Sample_Schema = () => ( +