#Function arg type?

3 messages · Page 1 of 1 (latest)

torn dome
#

I there a way to make the** auto docs **and preview code work with functions in the stories? Currently my component accepts a function as a prop. But the docs show this ()=>{} which is not extremely useful.

balmy sinew
#

You could provide your own code snippet to be displayed to the end user by doing

parameters: {
  docs: {
      source: {
        code: `
        // custom code here
        `,
      },
  },
}

But I do wish Storybook would show this by default as well