Skip to content

Commit

Permalink
docs(storybook): fix code tab (#1607)
Browse files Browse the repository at this point in the history
  • Loading branch information
kabaros authored Sep 25, 2024
1 parent 5552de7 commit 37d0b5a
Show file tree
Hide file tree
Showing 4 changed files with 1,371 additions and 3,005 deletions.
5 changes: 1 addition & 4 deletions storybook/config/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ module.exports = {
name: '@storybook/addon-essentials',
options: { docs: false },
},
{
name: '@storybook/addon-storysource',
options: { loaderOptions: { injectDecorator: false } },
},
'@mihkeleidast/storybook-addon-source',
getAbsolutePath('@storybook/addon-a11y'),
getAbsolutePath('@storybook/preset-create-react-app'),
],
Expand Down
12 changes: 2 additions & 10 deletions storybook/config/preview.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import '@fontsource/roboto/latin.css'
import { CssReset } from '@dhis2-ui/css'
import React, { Fragment } from 'react'
// import { jsxDecorator } from 'storybook-addon-jsx'
import '@storybook/addon-console'
const { withJsx } = require('@mihkeleidast/storybook-addon-source')

export const decorators = [
// Enable storybook jsx visualization
// jsxDecorator,
withJsx,
/**
* Basic wrapper for all our components, styles the root elements and applies
* our css reset for consistency/
Expand Down Expand Up @@ -39,13 +38,6 @@ export const parameters = {
method: 'alphabetical',
},
},
jsx: {
filterProps: (val) => val !== undefined,
showDefaultProps: false,
functionValue: (fn) => fn.name,
tabStop: 4,
maxInlineAttributesLineLength: 80,
},
// A11y addon config
a11y: {
// the target DOM element
Expand Down
26 changes: 13 additions & 13 deletions storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,23 @@
"@dhis2-ui/css": "9.11.4",
"@dhis2/ui-constants": "9.11.4",
"@fontsource/roboto": "^4.5.0",
"@storybook/addon-a11y": "^8.0.6",
"@storybook/addon-a11y": "^8.3.3",
"@storybook/addon-console": "^3.0.0",
"@storybook/addon-essentials": "^8.0.6",
"@storybook/addon-storysource": "^8.0.6",
"@storybook/channels": "^8.0.6",
"@storybook/components": "^8.0.6",
"@storybook/core-events": "^8.0.6",
"@storybook/node-logger": "^8.0.6",
"@storybook/preset-create-react-app": "^8.0.6",
"@storybook/react": "^8.0.6",
"@storybook/theming": "^8.0.6",
"storybook-addon-jsx": "^7.3.14"
"@storybook/addon-essentials": "^8.3.3",
"@storybook/addon-storysource": "^8.3.3",
"@storybook/channels": "^8.3.3",
"@storybook/components": "^8.3.3",
"@storybook/core-events": "^8.3.3",
"@storybook/node-logger": "^8.3.3",
"@storybook/preset-create-react-app": "^8.3.3",
"@storybook/react": "^8.3.3",
"@storybook/theming": "^8.3.3",
"@mihkeleidast/storybook-addon-source": "1.0.1"
},
"devDependencies": {
"@storybook/react-webpack5": "^8.0.6",
"@storybook/react-webpack5": "^8.3.3",
"crypto-browserify": "^3.12.0",
"storybook": "^8.0.6",
"storybook": "^8.3.3",
"stream-browserify": "^3.0.0",
"styled-jsx": "^4.0.1"
}
Expand Down
Loading

0 comments on commit 37d0b5a

Please sign in to comment.