Skip to content

How to globally register a custom Vue 3 directive in Storybook? #31535

Closed Answered by mathildebuenerd
mathildebuenerd asked this question in Help
Discussion options

You must be logged in to vote

Realized after a fresh look: I mistakenly placed the setup function inside the preview object, but it needs to be defined at the root level of the file.

const preview = {
  // preview object
}

setup((app) => {
  app.use(GiaTooltipDirective)
})

Issue resolved — closing it now 🙏

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mathildebuenerd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant