-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Restore wrapping of items in Page Menu (#1145)
- Loading branch information
1 parent
848223b
commit 4068e52
Showing
6 changed files
with
74 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,27 @@ | ||
import { Canvas, Markdown, Meta, Primary } from "@storybook/blocks"; | ||
import { Canvas, Controls, Markdown, Meta, Primary } from "@storybook/blocks"; | ||
import * as PageMenuStories from "./PageMenu.stories.tsx"; | ||
import README from "../../../../packages/css/src/components/page-menu/README.md?raw"; | ||
|
||
<Meta of={PageMenuStories} /> | ||
|
||
<Markdown>{README}</Markdown> | ||
|
||
<Primary /> | ||
|
||
<Controls /> | ||
|
||
## Examples | ||
|
||
### Default | ||
### Alignment | ||
|
||
<Primary /> | ||
In the [Header](?path=/docs/components-containers-header--docs), the menu aligns to the end of the line. | ||
|
||
<Canvas of={PageMenuStories.Alignment} /> | ||
|
||
## Right Alignment | ||
### Wrapping | ||
|
||
It may happen that all menu items do not fit on a single line, for example, in a medium-width window or with zoomed-in text. | ||
If the menu itself is right-aligned, as is often the case in headers, then you should also right-align the items within it. | ||
If all menu items do not fit on a single line, e.g. on a narrow screen or with zoomed-in text, they wrap to new lines. | ||
This is often useful in the [Footer](?path=/docs/components-containers-footer--docs). | ||
The Header has its own responsive behaviour; its Page Menu should be configured not to wrap. | ||
|
||
<Canvas of={PageMenuStories.AlignEnd} /> | ||
<Canvas of={PageMenuStories.Wrapping} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters