how to use this as a global doc block? #88
Answered
by
pocka
BartJanvanAssen
asked this question in
Q&A
-
When I add the Design block to the global doc page, I still need to add the storyId // preview.js addParameters({
docs: {
page: () => (
<>
<Design storyId='some-story-id' />
<Title />
<Subtitle />
<Description />
<Primary />
<ArgsTable story={PRIMARY_STORY} />
<Stories />
</>
)
}
}) // Some story export Default {
title: 'title',
component: Title,
parameters: {
design: {
type: 'figma',
url: 'https://www.figma.com/embed?embed_host=share&url=https%3A%...'
}
},
} |
Beta Was this translation helpful? Give feedback.
Answered by
pocka
Mar 9, 2021
Replies: 1 comment
-
The purpose of the addParameters({
docs: {
page: () => (
<>
<Figma url="https://www.figma.com/embed?embed_host=share&url=https%3A%..." />
<Title />
<Subtitle />
<Description />
<Primary />
<ArgsTable story={PRIMARY_STORY} />
<Stories />
</>
)
}
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
pocka
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The purpose of the
Design
Block is to remove the need for the duplicated config between story parameters and Docs Page.For non-story-specific usage, what you want is the
Figma
Block.