diff --git a/packages/manager/.changeset/pr-9948-tech-stories-1701381411461.md b/packages/manager/.changeset/pr-9948-tech-stories-1701381411461.md new file mode 100644 index 00000000000..f73eedeed3f --- /dev/null +++ b/packages/manager/.changeset/pr-9948-tech-stories-1701381411461.md @@ -0,0 +1,5 @@ +--- +"@linode/manager": Tech Stories +--- + +TopMenu and TagsList Storybook v7 Stories ([#9948](https://github.com/linode/manager/pull/9948)) diff --git a/packages/manager/src/components/ColorPalette/ColorPalette.stories.mdx b/packages/manager/src/components/ColorPalette/ColorPalette.stories.mdx index f8adf3728df..4e741748053 100644 --- a/packages/manager/src/components/ColorPalette/ColorPalette.stories.mdx +++ b/packages/manager/src/components/ColorPalette/ColorPalette.stories.mdx @@ -1,7 +1,7 @@ import { ArgsTable, Canvas, Meta, Story } from '@storybook/addon-docs'; import { ColorPalette } from './ColorPalette'; - + # Color Palette diff --git a/packages/manager/src/components/ImageSelect/imageIcons.stories.mdx b/packages/manager/src/components/ImageSelect/imageIcons.stories.mdx deleted file mode 100644 index 9d1ccb701f3..00000000000 --- a/packages/manager/src/components/ImageSelect/imageIcons.stories.mdx +++ /dev/null @@ -1,45 +0,0 @@ -import { ArgsTable, Canvas, Meta, Story } from '@storybook/addon-docs'; -import { makeStyles } from '@mui/styles'; -import { distroIcons } from 'src/components/ImageSelect/icons'; -import Grid from '@mui/material/Unstable_Grid2'; -import 'font-logos/assets/font-logos.css'; - - - -export const useStyles = makeStyles(() => ({ - item: { - display: 'flex', - flexDirection: 'column', - alignItems: 'center', - width: 125, - '& span': { - fontSize: '40px', - }, - }, - label: { - fontSize: '0.875rem', - margin: 8, - }, -})); - -export const DistributionIcons = () => { - const classes = useStyles(); - return ( - - {Object.entries(distroIcons).map(([iconLabel, icon]) => { - return ( - - -
{iconLabel}
-
- ); - })} -
- ); -}; - -# Distribution Icons - - - - 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="" - /> - ); -}; - - - -