Created
March 21, 2024 01:49
-
-
Save suicide/2532c250e78da52cb6848aecf401e97c to your computer and use it in GitHub Desktop.
tree sitter crash example svelte file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script lang="ts" context="module"> | |
import WarningAccordion from '$lib/components/ui2/WarningAccordion.svelte'; | |
import {type WarningMessage} from '$lib/components/ui2/WarningAccordion.svelte'; | |
const messages: Array<WarningMessage> = [ | |
{ | |
type: 'error', | |
title: 'error', | |
text: 'something horrible' | |
}, | |
{ | |
type: 'warning', | |
title: 'warning', | |
text: 'something not so horrible' | |
}, | |
] | |
export const meta = { | |
title: 'WarningAccordion', | |
component: WarningAccordion, | |
tags: ['autodocs'], | |
args: { | |
messages: messages | |
}, | |
argTypes: { | |
// value: { | |
// control: { | |
// type: 'number', | |
// min: 0, | |
// max: 100 | |
// }, | |
// description: 'Value to show', | |
// type: { | |
// required: true, | |
// name: 'number' | |
// } | |
// }, | |
} | |
}; | |
</script> | |
<script lang="ts"> | |
import { Story, Template } from '@storybook/addon-svelte-csf'; | |
</script> | |
<Template let:args> | |
<WarningAccordion {...args} /> | |
</Template> | |
<Story name="default" args={{}} /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment