Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs(Overlay): Add default and playground story #5245

Merged
merged 4 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 55 additions & 4 deletions packages/react/.storybook/preview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,69 @@ const preview = {
],
],
],
'Experimental',
[
'Experimental',
[
[
// Match on any story that leads with "Components"
'Components',
// This is the ordering of stories under "Components", by default
// we'll sort alphabetically
[
[
'*',
// Within a set of stories, set the order to the following
['*', 'Playground', /Playground$/, 'Features', 'Examples'],
],
],
]
]
],
'Behaviors',
'Hooks',
'Deprecated',
'Private',
[
'Deprecated',
[
[
// Match on any story that leads with "Components"
'Components',
// This is the ordering of stories under "Components", by default
// we'll sort alphabetically
[
[
'*',
// Within a set of stories, set the order to the following
['*', 'Playground', /Playground$/, 'Features', 'Examples'],
],
],
]
]
],
[
'Private',
[
[
// Match on any story that leads with "Components"
'Components',
// This is the ordering of stories under "Components", by default
// we'll sort alphabetically
[
[
'*',
// Within a set of stories, set the order to the following
['*', 'Playground', /Playground$/, 'Features', 'Examples'],
],
],
]
]
],
'*',
]

/**
* Get the position of an item within a given order. This will return the
* index if the item is defined in the given array, or the wildcard index
* if it is not explicitlyd efined
* if it is not explicitly defined
*/
function getPosition(order, item) {
const position = order.findIndex(value => {
Expand Down
Loading
Loading