mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-09 00:19:13 +08:00
Fix TS variants and polish snippets
This commit is contained in:
parent
9887c20cd2
commit
97204734d6
@ -16,4 +16,4 @@ export const globalTypes = {
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
```
|
||||
|
@ -7,15 +7,14 @@ import { Preview } from '@storybook/your-framework';
|
||||
const preview: Preview = {
|
||||
globalTypes: {
|
||||
theme: {
|
||||
name: 'Theme',
|
||||
description: 'Global theme for components',
|
||||
defaultValue: 'light',
|
||||
toolbar: {
|
||||
// The label to show for this toolbar item
|
||||
title: 'Theme',
|
||||
icon: 'circlehollow',
|
||||
// Array of plain string values or MenuItem shape (see below)
|
||||
items: ['light', 'dark'],
|
||||
// Property that specifies if the name of the item will be displayed
|
||||
showName: true,
|
||||
// Change title based on selected value
|
||||
dynamicTitle: true,
|
||||
},
|
||||
|
@ -17,4 +17,4 @@ export const globalTypes = {
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
```
|
||||
|
@ -7,7 +7,6 @@ import { Preview } from '@storybook/your-framework';
|
||||
const preview: Preview = {
|
||||
globalTypes: {
|
||||
locale: {
|
||||
name: 'Locale',
|
||||
description: 'Internationalization locale',
|
||||
defaultValue: 'en',
|
||||
toolbar: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user