diff --git a/src/stories/MakeCodeBlocksRendering.stories.tsx b/src/stories/MakeCodeBlocksRendering.stories.tsx index 2064031..8e8e153 100644 --- a/src/stories/MakeCodeBlocksRendering.stories.tsx +++ b/src/stories/MakeCodeBlocksRendering.stories.tsx @@ -56,238 +56,238 @@ const getOptionsFromVersion = ( return options; }; -export const InitialBlankProject: Story = { - name: 'Initial blank project', +export const Simple: Story = { render: (args) => { const { options: version } = args; const options = getOptionsFromVersion(version as string); return ( - + ); }, }; -export const EmptyString: Story = { - name: 'Empty string', +export const XML: Story = { render: (args) => { const { options: version } = args; const options = getOptionsFromVersion(version as string); return ( - + ); }, }; -export const EmptyToBlocksTransition: Story = { - name: 'Empty to blocks transition', +export const Published: Story = { render: (args) => { const { options: version } = args; const options = getOptionsFromVersion(version as string); - const [project, setProject] = useState(initialProject); + console.log(options); return ( -
- - - -
- -
-
+ + +
); }, }; -export const RespectUserLayout: Story = { - name: 'Respect user layout', +export const Melody: Story = { render: (args) => { const { options: version } = args; const options = getOptionsFromVersion(version as string); return ( - + ); }, }; -export const Simple: Story = { +export const ExtensionBlockSingle: Story = { + name: 'Extension block (single)', render: (args) => { const { options: version } = args; const options = getOptionsFromVersion(version as string); return ( - + ); }, }; -export const XML: Story = { +export const ExtensionBlockTwo: Story = { + name: 'Extension block (two different)', render: (args) => { const { options: version } = args; const options = getOptionsFromVersion(version as string); return ( - + ); }, }; -export const Published: Story = { +export const ExtensionBlockStrawbees: Story = { + name: 'Extension block (Strawbees - spaces in name)', render: (args) => { const { options: version } = args; const options = getOptionsFromVersion(version as string); - console.log(options); return ( - + ); }, }; -export const Melody: Story = { +export const ExtensionBlockDatalogging: Story = { + name: 'Extension block (Datalogging)', render: (args) => { const { options: version } = args; const options = getOptionsFromVersion(version as string); return ( - + ); }, }; -export const ExtensionBlockSingle: Story = { - name: 'Extension block (single)', +export const CustomBlock: Story = { + name: 'Custom block', render: (args) => { const { options: version } = args; const options = getOptionsFromVersion(version as string); return ( - + ); }, }; -export const ExtensionBlockTwo: Story = { - name: 'Extension block (two different)', - render: (args) => { - const { options: version } = args; - const options = getOptionsFromVersion(version as string); +export const Error: Story = { + render: () => { return ( - - - + + + ); }, }; -export const ExtensionBlockStrawbees: Story = { - name: 'Extension block (Strawbees - spaces in name)', +export const Robust: Story = { + name: 'Robust against invalid/empty project', render: (args) => { const { options: version } = args; const options = getOptionsFromVersion(version as string); return ( - + ); }, }; -export const ExtensionBlockDatalogging: Story = { - name: 'Extension block (Datalogging)', +export const InitialBlankProject: Story = { + name: 'Initial blank project', render: (args) => { const { options: version } = args; const options = getOptionsFromVersion(version as string); return ( - + ); }, }; -export const CustomBlock: Story = { - name: 'Custom block', +export const EmptyString: Story = { + name: 'Empty string', render: (args) => { const { options: version } = args; const options = getOptionsFromVersion(version as string); return ( - + ); }, }; -export const Error: Story = { - render: () => { +export const EmptyToBlocksTransition: Story = { + name: 'Empty to blocks transition', + render: (args) => { + const { options: version } = args; + const options = getOptionsFromVersion(version as string); + const [project, setProject] = useState(initialProject); return ( - - - - + +
+ + + +
+ +
+
); }, }; -export const Robust: Story = { - name: 'Robust against invalid/empty project', +export const RespectUserLayout: Story = { + name: 'Respect user layout', render: (args) => { const { options: version } = args; const options = getOptionsFromVersion(version as string); return ( - + );