Skip to content

Commit

Permalink
Changing the default settings to use the typescript docgen results in…
Browse files Browse the repository at this point in the history
… much fewer changes

See storybookjs/storybook#26496
  • Loading branch information
pwolfert committed May 17, 2024
1 parent a36984b commit 6284f0c
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 51 deletions.
3 changes: 3 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ const config: StorybookConfig = {
`../packages/docs/content/**/${extensionGlob}`,
],
staticDirs: ['../packages/design-system-tokens/dist/css-vars'],
typescript: {
reactDocgen: 'react-docgen-typescript',
},
framework: {
name: getAbsolutePath('@storybook/react-webpack5'),
options: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
],
[
"type*",
"Sets the type to render checkbox fields or radio buttons\n\"checkbox\"\n\"radio\"",
"Sets the type to render checkbox fields or radio buttons\n\"radio\"\n\"checkbox\"",
"-"
],
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
],
[
"type*",
"Sets the type to render checkbox fields or radio buttons\n\"checkbox\"\n\"radio\"",
"Sets the type to render checkbox fields or radio buttons\n\"radio\"\n\"checkbox\"",
"-"
]
]
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
"Pass true to have the dialog close when its backdrop pseudo-element is clicked\nboolean",
"-"
],
[
"children",
"object",
"-"
],
[
"className",
"Additional classes to be added to the root dialog element.\nstring",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
[
"headingLevel",
"Heading type to override default <h3>\n\"1\"\n\"2\"\n\"3\"\n\"4\"\n\"5\"",
"\"3\""
"\"'3' as const\""
],
[
"headingRef",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,59 +1,22 @@
[
[
"Deprecated: Hints are now their own component called `Hint`."
],
[
"Deprecated: Hints are now their own component called `Hint`."
],
[
"Deprecated: Please render your error message directly with the 'InlineError' component instead of passing to `Label`"
],
[
"Deprecated: The Label is no longer responsible for rendering the error element from a string. A InlineError should be passed to it which already has an errorId applied."
"children",
"string",
"-"
],
[
"component",
"The root HTML element used to render the label\n\"label\"\n\"legend\"",
"\"label\""
],
[
"errorId",
"string\nDeprecated: The Label is no longer responsible for rendering the error element from a string. A InlineError should be passed to it which already has an errorId applied.",
"-"
],
[
"errorMessage",
"ReactNode\nDeprecated: Hints are now their own component called `Hint`.",
"-"
],
[
"fieldId",
"The ID of the field this label is for. This is used for the label's for attribute and any related ARIA attributes, such as for the error message.\n\nstring",
"-"
],
[
"hint",
"ReactNode\nDeprecated: Hints are now their own component called `Hint`.",
"-"
],
[
"hintId",
"string\nDeprecated: Please render your error message directly with the 'InlineError' component instead of passing to `Label`",
"-"
],
[
"inversed",
"Set to true to apply the \"inverse\" theme\nboolean",
"-"
],
[
"ref",
"Ref<HTMLLabelElement> & Ref<HTMLLegendElement>",
"-"
],
[
"requirementLabel",
"Text showing the requirement (\"Required\", \"Optional\", etc.). See Required and Optional Fields.\nReactNode",
"-"
]
]
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
],
[
"placement",
"Placement of the tooltip body relative to the trigger. See the popperjs docs for more info.\n\"top\"\n\"auto\"\n\"auto-start\"\n\"auto-end\"\n\"bottom\"\n\"right\"\n\"left\"\n\"top-start\"\nShow 7 more...",
"Placement of the tooltip body relative to the trigger. See the popperjs docs for more info.\n\"top\"\n\"bottom\"\n\"auto\"\n\"auto-start\"\n\"auto-end\"\n\"right\"\n\"left\"\n\"top-start\"\nShow 7 more...",
"\"top\""
],
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
no args table
[
[
"bordered",
"boolean",
"-"
],
[
"openItems",
"array",
"-"
]
]
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,5 @@
"variation",
"A string corresponding to the Alert variation classes (error, warn, success)\n\"success\"\n\"warn\"\n\"error\"",
"-"
],
[
"weight",
"A string corresponding to the Alert weight classes (lightweight)\n\"lightweight\"",
"-"
]
]
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
],
[
"variation",
"A string corresponding to the badge-component variation classes\n\"alert\"\n\"info\"\n\"success\"\n\"warn\"",
"A string corresponding to the badge-component variation classes\n\"info\"\n\"success\"\n\"warn\"\n\"alert\"",
"-"
]
]

0 comments on commit 6284f0c

Please sign in to comment.