23 lines
550 B
Svelte
23 lines
550 B
Svelte
|
|
<script module>
|
||
|
|
import { defineMeta } from '@storybook/addon-svelte-csf';
|
||
|
|
import ContentEditable from './ContentEditable.svelte';
|
||
|
|
|
||
|
|
const { Story } = defineMeta({
|
||
|
|
title: 'Shared/ContentEditable',
|
||
|
|
tags: ['autodocs'],
|
||
|
|
parameters: {
|
||
|
|
docs: {
|
||
|
|
story: { inline: false }, // Render stories in iframe for state isolation
|
||
|
|
},
|
||
|
|
},
|
||
|
|
});
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<script lang="ts">
|
||
|
|
let value = $state('Here we can type and edit the content. Try it!');
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<Story name="Default">
|
||
|
|
<ContentEditable bind:text={value} />
|
||
|
|
</Story>
|