chore: add Surface story
This commit is contained in:
parent
195ce6e4c0
commit
e5fc315852
3 changed files with 31 additions and 0 deletions
11
webui/src/stories/FullscreenDecorator.svelte
Normal file
11
webui/src/stories/FullscreenDecorator.svelte
Normal file
|
@ -0,0 +1,11 @@
|
|||
<slot />
|
||||
|
||||
<style>
|
||||
:global(body.sb-main-fullscreen) {
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
:global(#storybook-root) {
|
||||
display: contents;
|
||||
}
|
||||
</style>
|
|
@ -1,5 +1,6 @@
|
|||
import type { Meta, StoryObj } from "@storybook/svelte";
|
||||
import Selector from "../components/utils/Selector.svelte";
|
||||
import RouterDecorator from "./RouterDecorator.svelte";
|
||||
|
||||
const meta: Meta<Selector> = {
|
||||
title: "Widgets/Selector",
|
||||
|
@ -10,6 +11,7 @@ const meta: Meta<Selector> = {
|
|||
action: "input",
|
||||
},
|
||||
},
|
||||
decorators: [() => RouterDecorator], // due to upobject link in selected state
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
|
18
webui/src/stories/Surface.stories.ts
Normal file
18
webui/src/stories/Surface.stories.ts
Normal file
|
@ -0,0 +1,18 @@
|
|||
import type { Meta, StoryObj } from "@storybook/svelte";
|
||||
import Surface from "../views/Surface.svelte";
|
||||
import FullscreenDecorator from "./FullscreenDecorator.svelte";
|
||||
|
||||
const meta: Meta<Surface> = {
|
||||
title: "Views/Surface",
|
||||
component: Surface,
|
||||
tags: ["autodocs"],
|
||||
parameters: {
|
||||
layout: "fullscreen",
|
||||
},
|
||||
decorators: [() => FullscreenDecorator],
|
||||
};
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<Surface>;
|
||||
|
||||
export const Default: Story = {};
|
Loading…
Reference in a new issue