-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fix: update default top-bar popover y offset * feat: update docs to include different viewport
- Loading branch information
1 parent
76eb8dc
commit 9066a35
Showing
7 changed files
with
172 additions
and
556 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,25 @@ | ||
import { Canvas, Controls, Meta } from '@storybook/blocks' | ||
import { RenderHtmlMarkup } from '../../storybook/render-html-markup' | ||
import * as TopBarStories from './top-bar.stories' | ||
import { GuidelinesImage } from '../../storybook/figma' | ||
|
||
<Meta of={TopBarStories} /> | ||
|
||
<GuidelinesImage name="TopBar" /> | ||
# Top bar | ||
|
||
## Styles Only Usage | ||
Top bar component is part of the element's navigation, It is composed of several components to easily create a top navigation structure. | ||
|
||
To display `TopBar` with vanilla usage, you will need to compose your component using `.el-top-bar, .el-top-bar-main-nav, .el-top-bar-search, .el-top-bar-secondary-nav, and .el-top-bar-profile` classes as the example below. | ||
## Default | ||
|
||
<Canvas of={TopBarStories.StylesOnlyUsage} /> | ||
To display `TopBar` with vanilla usage, you will need to compose your component using `.el-top-bar, .el-top-bar-main-nav, .el-top-bar-search, .el-top-bar-secondary-nav, and .el-top-bar-profile` classes or respective component for each class for React usage as the example below. | ||
|
||
<RenderHtmlMarkup of={TopBarStories.StylesOnlyUsage} /> | ||
<Canvas of={TopBarStories.Default} /> | ||
|
||
<RenderHtmlMarkup of={TopBarStories.Default} /> | ||
|
||
## React Usage | ||
|
||
In React version, you will need to use `TopBar` compound component to compose the `TopBar` as shown below. | ||
In the React usage, you can utilize `CSSContainerQuery` component to conditionally render the Main navigation section based on the viewport size, as demonstrated below (on wider screens all buttons should visible). | ||
|
||
<Canvas of={TopBarStories.ReactUsage} /> | ||
<Canvas of={TopBarStories.ResponsiveMainNav} /> | ||
|
||
<RenderHtmlMarkup of={TopBarStories.ReactUsage} /> | ||
<RenderHtmlMarkup of={TopBarStories.ResponsiveMainNav} /> |
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,7 +1,6 @@ | ||
import Accordion from './accordion.svg' | ||
import ButtonGroup from './button-group.svg' | ||
import TopBar from './top-bar.svg' | ||
|
||
// TODO: can delete this, as we're not planning to use Design Guidelines docs as a documentation for developer | ||
export { Accordion } | ||
export { TopBar } | ||
export { ButtonGroup } |
This file was deleted.
Oops, something went wrong.
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