2022-04-10 21:42:53 +00:00
|
|
|
<Meta
|
|
|
|
title="Output/Print"
|
|
|
|
component={Print}
|
|
|
|
argTypes={{
|
|
|
|
isMovable: { defaultValue: false },
|
|
|
|
}}
|
|
|
|
/>
|
2022-03-26 18:24:57 +00:00
|
|
|
|
|
|
|
<Story name="Primary" args={{}} />
|
|
|
|
|
|
|
|
<Template let:args>
|
2022-04-10 21:42:53 +00:00
|
|
|
<div style="width: 50em; positive: relative;">
|
|
|
|
<Print ship={$shipState} {...args} />
|
2022-03-26 18:24:57 +00:00
|
|
|
</div>
|
|
|
|
</Template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { Meta, Template, Story } from "@storybook/addon-svelte-csf";
|
|
|
|
import { action } from "@storybook/addon-actions";
|
|
|
|
|
2022-04-10 21:42:53 +00:00
|
|
|
import { setContext } from "svelte";
|
2022-03-26 18:24:57 +00:00
|
|
|
|
2022-04-10 21:42:53 +00:00
|
|
|
import sample from "./sample.js";
|
|
|
|
import shipStore from "$lib/store/ship.js";
|
|
|
|
|
|
|
|
const ship = shipStore(sample);
|
|
|
|
|
|
|
|
setContext("ship", ship);
|
|
|
|
|
|
|
|
const shipState = ship.state;
|
|
|
|
|
|
|
|
import Print from "./index.svelte";
|
2022-03-26 18:24:57 +00:00
|
|
|
</script>
|