Skip to content

Instantly share code, notes, and snippets.

@suicide
Created March 21, 2024 01:49
Show Gist options
  • Save suicide/2532c250e78da52cb6848aecf401e97c to your computer and use it in GitHub Desktop.
Save suicide/2532c250e78da52cb6848aecf401e97c to your computer and use it in GitHub Desktop.
tree sitter crash example svelte file
<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