-
Notifications
You must be signed in to change notification settings - Fork 399
refactor: [M3-7509, M3-7518] TopMenu and TagsList v7 Stories #9948
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@linode/manager": Tech Stories | ||
| --- | ||
|
|
||
| TopMenu and TagsList Storybook v7 Stories ([#9948](https://github.com/linode/manager/pull/9948)) |
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import * as React from 'react'; | ||
|
|
||
| import { Tags } from './Tags'; | ||
|
|
||
| import type { TagsProps } from './Tags'; | ||
| import type { Meta, StoryObj } from '@storybook/react'; | ||
|
|
||
| export const Default: StoryObj<TagsProps> = { | ||
| render: (args) => <Tags {...args} />, | ||
| }; | ||
|
|
||
| const meta: Meta<TagsProps> = { | ||
| args: { | ||
| tags: ['tag1', 'tag2', 'tag3', 'tag4', 'tag5'], | ||
| }, | ||
| component: Tags, | ||
| title: 'Components/Tags/Tags List', | ||
| }; | ||
| export default meta; |
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import * as React from 'react'; | ||
|
|
||
| import { TopMenu } from './TopMenu'; | ||
|
|
||
| import type { TopMenuProps } from './TopMenu'; | ||
| import type { Meta, StoryObj } from '@storybook/react'; | ||
|
|
||
| export const Default: StoryObj<TopMenuProps> = { | ||
| render: (args) => <TopMenu {...args} />, | ||
| }; | ||
|
|
||
| const meta: Meta<TopMenuProps> = { | ||
| args: { | ||
| desktopMenuToggle: () => null, | ||
| isSideMenuOpen: false, | ||
| openSideMenu: () => null, | ||
| username: 'User 1', | ||
| }, | ||
| component: TopMenu, | ||
| title: 'Features/Navigation/Top Menu', | ||
| }; | ||
| export default meta; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,13 +17,17 @@ import SearchBar from './SearchBar/SearchBar'; | |
| import { TopMenuIcon } from './TopMenuIcon'; | ||
| import { UserMenu } from './UserMenu'; | ||
|
|
||
| interface TopMenuProps { | ||
| export interface TopMenuProps { | ||
| desktopMenuToggle: () => void; | ||
| isSideMenuOpen: boolean; | ||
| openSideMenu: () => void; | ||
| username: string; | ||
| } | ||
|
|
||
| /** | ||
| * - Items presented in the top navigation are considered universally important and should be available regardless of any particular task. | ||
| * - The number of items should be limited. In the future, **Help & Support** could become a drop down with links to **Community**, **Guides**, and etc. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I know this was existing copy, just ported over. I wonder if we have a ticket for this. |
||
| */ | ||
| export const TopMenu = React.memo((props: TopMenuProps) => { | ||
| const { desktopMenuToggle, isSideMenuOpen, openSideMenu, username } = props; | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit more relevant a title, and will also push this category down. Eventually the design system will have its own storybook and it won't belong here, but for now we'll keep this page alive.