Skip to content
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
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))
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ArgsTable, Canvas, Meta, Story } from '@storybook/addon-docs';
import { ColorPalette } from './ColorPalette';

<Meta title="Core Styles/Color Palette" component={ColorPalette} />
<Meta title="Design System/Color Palette" component={ColorPalette} />
Copy link
Contributor Author

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.


# Color Palette

Expand Down

This file was deleted.

19 changes: 0 additions & 19 deletions packages/manager/src/components/Tags/Tags.stories.mdx

This file was deleted.

19 changes: 19 additions & 0 deletions packages/manager/src/components/Tags/Tags.stories.tsx
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;
7 changes: 4 additions & 3 deletions packages/manager/src/components/Tags/Tags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ import { ShowMore } from 'src/components/ShowMore/ShowMore';
import { Tag } from 'src/components/Tag/Tag';

export interface TagsProps {
/**
* An array of tags to be displayed.
*/
tags: string[];
}

const Tags = (props: TagsProps) => {
export const Tags = (props: TagsProps) => {
const { tags } = props;

const renderTags = (tags: string[]) => {
Expand Down Expand Up @@ -40,5 +43,3 @@ const Tags = (props: TagsProps) => {
</>
);
};

export { Tags };
33 changes: 0 additions & 33 deletions packages/manager/src/components/TopMenu.stories.mdx

This file was deleted.

49 changes: 0 additions & 49 deletions packages/manager/src/components/UIIcons.stories.mdx

This file was deleted.

This file was deleted.

22 changes: 22 additions & 0 deletions packages/manager/src/features/TopMenu/TopMenu.stories.tsx
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;
6 changes: 5 additions & 1 deletion packages/manager/src/features/TopMenu/TopMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future, Help & Support could become a drop down with links to Community, Guides, and etc.

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;

Expand Down