We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug Autogeneration of properties,events and slots doenst work when I user: "export let varName: string;"
Icon.stories.svelte:
<script> import Icon from '$components/Icon.svelte'; import { Meta, Story, Template } from '@storybook/addon-svelte-csf'; </script> <Meta component={Icon} /> <Template let:args> <Icon {...args} /> </Template> <Story name="Person" args={{ icon: 'person', }} /> <Story name="Arrow Left" args={{ icon: 'arrow_left', }} />
Autogeneration working Component : Icon.svelte
<script lang="ts"> import { createEventDispatcher } from 'svelte'; export let icon = ''; export let size = ''; export let color = ''; export let cursor = ''; export let bold = false; const dispatch = createEventDispatcher(); const click = () => { dispatch('click'); }; </script> <span class:material-icons={icon} style:cursor style:color style:font-weight={bold ? 'bold' : 'normal'} style:--icon-size={size} on:click={click} > {icon} </span> <style> /* @import 'https://fonts.googleapis.com/icon?family=Material+Icons'; */ @font-face { font-family: 'Material Icons'; font-style: normal; font-weight: 400; src: url('/MaterialIcons-Regular.ttf') format('truetype'); } .material-icons { width: var(--icon-size); height: var(--icon-size); font-size: var(--icon-size); font-family: 'Material Icons'; font-weight: normal; font-style: normal; display: inline-block; text-transform: none; letter-spacing: normal; word-wrap: normal; white-space: nowrap; direction: ltr; /* Support for all WebKit browsers. */ -webkit-font-smoothing: antialiased; /* Support for Safari and Chrome. */ text-rendering: optimizeLegibility; /* Support for Firefox. */ -moz-osx-font-smoothing: grayscale; /* Support for IE. */ font-feature-settings: 'liga'; } </style>
result:
Autogeneration NOT working Component: Icon.svelte
<script lang="ts"> import { createEventDispatcher } from 'svelte'; export let icon: string; export let size = ''; export let color = ''; export let cursor = ''; export let bold = false; const dispatch = createEventDispatcher(); const click = () => { dispatch('click'); }; </script> <span class:material-icons={icon} style:cursor style:color style:font-weight={bold ? 'bold' : 'normal'} style:--icon-size={size} on:click={click} > {icon} </span> <style> /* @import 'https://fonts.googleapis.com/icon?family=Material+Icons'; */ @font-face { font-family: 'Material Icons'; font-style: normal; font-weight: 400; src: url('/MaterialIcons-Regular.ttf') format('truetype'); } .material-icons { width: var(--icon-size); height: var(--icon-size); font-size: var(--icon-size); font-family: 'Material Icons'; font-weight: normal; font-style: normal; display: inline-block; text-transform: none; letter-spacing: normal; word-wrap: normal; white-space: nowrap; direction: ltr; /* Support for all WebKit browsers. */ -webkit-font-smoothing: antialiased; /* Support for Safari and Chrome. */ text-rendering: optimizeLegibility; /* Support for Firefox. */ -moz-osx-font-smoothing: grayscale; /* Support for IE. */ font-feature-settings: 'liga'; } </style>
The text was updated successfully, but these errors were encountered:
+1 I have a similar issue I'm using the latest prerelese version.
Sorry, something went wrong.
Storybook uses sveltedoc-parser for extracting component docs and properties. It doesn't support typescript now : KatChaotic/sveltedoc-parser#34
Hi, we can track this issue in #15891.
No branches or pull requests
Describe the bug
Autogeneration of properties,events and slots doenst work when I user: "export let varName: string;"
Icon.stories.svelte:
Autogeneration working Component :
Icon.svelte
result:
Autogeneration NOT working Component:
Icon.svelte
result:
The text was updated successfully, but these errors were encountered: