Skip to content

Commit c0cf183

Browse files
committed
fix: hide toolbar on storybook welcome doc page
1 parent a51d2c0 commit c0cf183

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.storybook/manager.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,16 @@ import npmxDark from './theme'
44

55
addons.setConfig({
66
theme: npmxDark,
7+
layoutCustomisations: {
8+
showToolbar: (state, defaultValue) => {
9+
if (state.viewMode === 'docs' && state.storyId) {
10+
const story = state.index?.[state.storyId]
11+
const tags = story?.tags || []
12+
if (tags.includes('hide-toolbar')) {
13+
return false
14+
}
15+
}
16+
return defaultValue
17+
},
18+
},
719
})

.storybook/storybook-welcome.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Meta } from '@storybook/addon-docs/blocks';
22

3-
<Meta title="Welcome" />
3+
<Meta title="Welcome" tags={['hide-toolbar']}/>
44

55
# Welcome
66

0 commit comments

Comments
 (0)