mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Grafana/ui: Storybook controls understand component types (#29574)
* feat(grafana-ui): use storybook docgen over webpack config * chore(grafana-ui): bump storybook to latest (6.1.9)
This commit is contained in:
parent
985c7934d9
commit
55d536c6bc
@ -26,7 +26,9 @@ module.exports = {
|
||||
check: true,
|
||||
reactDocgen: 'react-docgen-typescript',
|
||||
reactDocgenTypescriptOptions: {
|
||||
tsconfigPath: path.resolve(__dirname, 'tsconfig.json'),
|
||||
shouldExtractLiteralValuesFromEnum: true,
|
||||
shouldRemoveUndefinedFromOptional: true,
|
||||
propFilter: (prop: any) => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true),
|
||||
},
|
||||
},
|
||||
@ -44,21 +46,6 @@ module.exports = {
|
||||
configFile: path.resolve(__dirname, 'tsconfig.json'),
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: require.resolve('react-docgen-typescript-loader'),
|
||||
options: {
|
||||
tsconfigPath: path.resolve(__dirname, 'tsconfig.json'),
|
||||
// https://github.com/styleguidist/react-docgen-typescript#parseroptions
|
||||
// @ts-ignore
|
||||
propFilter: prop => {
|
||||
if (prop.parent) {
|
||||
return !prop.parent.fileName.includes('node_modules/@types/react/');
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
@ -77,12 +77,12 @@
|
||||
"@rollup/plugin-commonjs": "16.0.0",
|
||||
"@rollup/plugin-image": "2.0.5",
|
||||
"@rollup/plugin-node-resolve": "10.0.0",
|
||||
"@storybook/addon-essentials": "6.1.2",
|
||||
"@storybook/addon-controls": "6.1.2",
|
||||
"@storybook/addon-knobs": "6.1.2",
|
||||
"@storybook/addon-storysource": "6.1.2",
|
||||
"@storybook/react": "6.1.2",
|
||||
"@storybook/theming": "6.1.2",
|
||||
"@storybook/addon-essentials": "6.1.9",
|
||||
"@storybook/addon-controls": "6.1.9",
|
||||
"@storybook/addon-knobs": "6.1.9",
|
||||
"@storybook/addon-storysource": "6.1.9",
|
||||
"@storybook/react": "6.1.9",
|
||||
"@storybook/theming": "6.1.9",
|
||||
"@types/classnames": "2.2.7",
|
||||
"@types/common-tags": "^1.8.0",
|
||||
"@types/d3": "5.7.2",
|
||||
|
Loading…
Reference in New Issue
Block a user