Skip to content

Commit

Permalink
Merge pull request aeagle#167 from aeagle/fix-nested-story
Browse files Browse the repository at this point in the history
Fix nested story
  • Loading branch information
aeagle authored Apr 21, 2024
2 parents a4fd9c9 + 4ca0674 commit 038342d
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 23 deletions.
22 changes: 22 additions & 0 deletions src/components/stories/01-examples/01-Nested.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Meta, Story, Canvas, Props } from "@storybook/addon-docs";

import { ViewPort, Left, Top, Right, Bottom, LeftResizable, TopResizable, RightResizable, BottomResizable, Fill } from "../../";
import { red, green, blue, description } from "../Utils";
import { CommonHeader } from "../Utils";
import * as Stories from './01-Nested.stories';

<CommonHeader />

<Meta of={Stories} />

## Nested spaces

Examples of nested spaces.

### Non-resizable

<Canvas of={Stories.NonResizable} />

### Resizable

<Canvas of={Stories.Resizable} />
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
import { Meta, Story, Canvas, Props } from "@storybook/addon-docs";

import { ViewPort, Left, Top, Right, Bottom, LeftResizable, TopResizable, RightResizable, BottomResizable, Fill } from "../../";
import * as React from "react";
import { ViewPort, Left, Top, Right, Bottom, LeftResizable, TopResizable, RightResizable, BottomResizable, Fill } from "../..";
import { red, green, blue, description } from "../Utils";
import { CommonHeader } from "../Utils";

<CommonHeader />

<Meta title="Basic examples/Nested" />

## Nested spaces

Examples of nested spaces.
export default {
title: "Basic examples/Nested",
};

### Non-resizable

<Canvas>
<Story name="Non-resizable">
export const NonResizable = {
render: () => (
<React.StrictMode>
<ViewPort>
<Left size="20%" style={green}>
Expand Down Expand Up @@ -51,13 +43,13 @@ Examples of nested spaces.
</Right>
</ViewPort>
</React.StrictMode>
</Story>
</Canvas>
),

### Resizable
name: "Non-resizable",
};

<Canvas>
<Story name="Resizable">
export const Resizable = {
render: () => (
<React.StrictMode>
<ViewPort>
<LeftResizable size="20%" style={green} trackSize={true}>
Expand Down Expand Up @@ -93,7 +85,10 @@ Examples of nested spaces.
<RightResizable size="20%" style={green} trackSize={true}>
{description("Right")}
</RightResizable>
</ViewPort>`
</ViewPort>
`
</React.StrictMode>
</Story>
</Canvas>
),

name: "Resizable",
};

0 comments on commit 038342d

Please sign in to comment.