From 841d04a36174e9aff0285569104f4dffe3477ecf Mon Sep 17 00:00:00 2001 From: Alban Bailly Date: Thu, 30 Nov 2023 16:23:48 -0500 Subject: [PATCH 1/3] Tags + TopMenu --- .../src/components/Tags/Tags.stories.mdx | 19 ----------- .../src/components/Tags/Tags.stories.tsx | 19 +++++++++++ packages/manager/src/components/Tags/Tags.tsx | 7 ++-- .../src/components/TopMenu.stories.mdx | 33 ------------------- .../src/features/TopMenu/TopMenu.stories.tsx | 22 +++++++++++++ .../manager/src/features/TopMenu/TopMenu.tsx | 6 +++- 6 files changed, 50 insertions(+), 56 deletions(-) delete mode 100644 packages/manager/src/components/Tags/Tags.stories.mdx create mode 100644 packages/manager/src/components/Tags/Tags.stories.tsx delete mode 100644 packages/manager/src/components/TopMenu.stories.mdx create mode 100644 packages/manager/src/features/TopMenu/TopMenu.stories.tsx diff --git a/packages/manager/src/components/Tags/Tags.stories.mdx b/packages/manager/src/components/Tags/Tags.stories.mdx deleted file mode 100644 index 5be03fea587..00000000000 --- a/packages/manager/src/components/Tags/Tags.stories.mdx +++ /dev/null @@ -1,19 +0,0 @@ -import { ArgsTable, Canvas, Meta, Story } from '@storybook/addon-docs'; -import { Tags } from './Tags'; - - - -# Tags List - -export const Template = (args) => ; - - - - {Template.bind({})} - - - - diff --git a/packages/manager/src/components/Tags/Tags.stories.tsx b/packages/manager/src/components/Tags/Tags.stories.tsx new file mode 100644 index 00000000000..27731490de1 --- /dev/null +++ b/packages/manager/src/components/Tags/Tags.stories.tsx @@ -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 = { + render: (args) => , +}; + +const meta: Meta = { + args: { + tags: ['tag1', 'tag2', 'tag3', 'tag4', 'tag5'], + }, + component: Tags, + title: 'Components/Tags/Tags List', +}; +export default meta; diff --git a/packages/manager/src/components/Tags/Tags.tsx b/packages/manager/src/components/Tags/Tags.tsx index 8368631426f..970e750d9e5 100644 --- a/packages/manager/src/components/Tags/Tags.tsx +++ b/packages/manager/src/components/Tags/Tags.tsx @@ -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[]) => { @@ -40,5 +43,3 @@ const Tags = (props: TagsProps) => { ); }; - -export { Tags }; diff --git a/packages/manager/src/components/TopMenu.stories.mdx b/packages/manager/src/components/TopMenu.stories.mdx deleted file mode 100644 index 87cbcc2fb28..00000000000 --- a/packages/manager/src/components/TopMenu.stories.mdx +++ /dev/null @@ -1,33 +0,0 @@ -import { Canvas, Meta, Story } from '@storybook/addon-docs'; -import { profileFactory } from 'src/factories'; -import { TopMenu } from 'src/features/TopMenu/TopMenu'; -import { useProfile } from 'src/queries/profile'; - - - -# Top Menu - -### Overview - ---- - -- 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. - -export const Template = () => { - return ( - null} - desktopMenuToggle={() => null} - isLoggedInAsCustomer={false} - username="" - /> - ); -}; - - - -