How to use ? #5
-
I installed and added settings to main.ts, but after run storybook nothing happened at all. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
It is designed to run when it detects a file save. Also, at this time we generate stories based on the type or interface information named |
Beta Was this translation helpful? Give feedback.
-
Idea: It would be nice if the Story file is also generated when |
Beta Was this translation helpful? Give feedback.
-
Oh I saw it run , but there are some problems what I have found
If we write props directly export const KTest = ({ text }: { text: string }) => {
return <div>{text}</div>
} It will throw error
If the file name is different from Props type name it also throw error components path : "/components/Foo/index.tsx"
// → Could not find argTypes
components : "/components/Foo.tsx" , type Props = {...} ;
export const Foo = ({ ... } : Props) => {
...
}
// → Could not find argTypes
export type KTestProps = {
text: string
count?: number
} & HTMLAttributes<HTMLDivElement>
export const KTest = memo(function MemorizedModal({ text }: KTestProps) {
return <div>{text}</div>
}) May be I should convert to issue ? |
Beta Was this translation helpful? Give feedback.
-
Thanks for investigating! Problem 1 and 2 are simply because we don't support the 2 writing styles of that program... As for Problem 3, I can't figure out the cause just from that code... |
Beta Was this translation helpful? Give feedback.
-
Fixed the above problem!
|
Beta Was this translation helpful? Give feedback.
-
Documentation will be updated at a later date. |
Beta Was this translation helpful? Give feedback.
Fixed the above problem!