Skip to content

Commit

Permalink
fix preview.js examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Sqrrl committed Nov 9, 2023
1 parent 5c86eb7 commit b0d2b55
Show file tree
Hide file tree
Showing 4 changed files with 2,204 additions and 1,312 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ You can specify the default tab shown in the addon panel. Set it to the correspo
`.storybook/preview.js`

```javascript
const preview = {
export default {
parameters: {
designToken: {
defaultTab: 'Colors'
Expand All @@ -127,7 +127,7 @@ To inject styles needed by your design token documentation, use the `styleInject
`.storybook/preview.js`

```javascript
const preview = {
export default {
parameters: {
designToken: {
styleInjection:
Expand All @@ -142,7 +142,7 @@ const preview = {
In some cases you might only want to use the Doc Blocks and hide the addon panel. You can do so by the setting the `disable` parameter:

```javascript
const preview = {
export default {
parameters: {
designToken: {
disable: true
Expand All @@ -156,7 +156,7 @@ const preview = {
In some cases you might not need the search field to be visible. You can control its visibility by the setting the `showSearch` parameter:

```javascript
const preview = {
export default {
parameters: {
designToken: {
showSearch: false
Expand All @@ -170,7 +170,7 @@ const preview = {
By default `pageSize` of the card view is 50 items. You can configure it by setting the `pageSize` parameter:

```javascript
const preview = {
export default {
parameters: {
designToken: {
pageSize: 10
Expand All @@ -182,7 +182,7 @@ const preview = {
You can disable pagination in the following way:

```javascript
const preview = {
export default {
parameters: {
designToken: {
// specify max value to disable pagination
Expand Down
9 changes: 9 additions & 0 deletions addon/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export default {
parameters: {
designToken: {
disable: false,
defaultTab: "Colors",
showSearch: true,
},
},
};
26 changes: 13 additions & 13 deletions addon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@
"build-storybook": "storybook build"
},
"devDependencies": {
"@storybook/addon-essentials": "^7.0.0",
"@storybook/addon-interactions": "^7.0.0",
"@storybook/addon-links": "^7.0.0",
"@storybook/addon-essentials": "^7.5.3",
"@storybook/addon-interactions": "^7.5.3",
"@storybook/addon-links": "^7.5.3",
"@storybook/builder-webpack5": "^7.0.5",
"@storybook/react": "^7.0.0",
"@storybook/react-vite": "^7.0.0",
"@storybook/react": "^7.5.3",
"@storybook/react-vite": "^7.5.3",
"@storybook/testing-library": "^0.0.14-next.1",
"@types/jsdom": "^21.1.1",
"@types/node": "^18.15.0",
Expand All @@ -81,20 +81,20 @@
"react": "^18.0.0",
"react-dom": "^18.0.0",
"rimraf": "^3.0.2",
"storybook": "^7.0.0",
"storybook": "^7.5.3",
"tsup": "^6.6.3",
"typescript": "^4.9.5",
"vite": "^4.1.4",
"zx": "^1.14.1"
},
"peerDependencies": {
"@storybook/blocks": "^7.0.0",
"@storybook/components": "^7.0.0",
"@storybook/core-events": "^7.0.0",
"@storybook/manager-api": "^7.0.0",
"@storybook/preview-api": "^7.0.0",
"@storybook/theming": "^7.0.0",
"@storybook/types": "^7.0.0",
"@storybook/blocks": "^7.5.3",
"@storybook/components": "^7.5.3",
"@storybook/core-events": "^7.5.3",
"@storybook/manager-api": "^7.5.3",
"@storybook/preview-api": "^7.5.3",
"@storybook/theming": "^7.5.3",
"@storybook/types": "^7.5.3",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
},
Expand Down
Loading

0 comments on commit b0d2b55

Please sign in to comment.