diff --git a/packages/storybook/src/react-components/alert/alert.stories.tsx b/packages/storybook/src/react-components/alert/alert.stories.tsx index 17e1a3e48..9c5ec54fe 100644 --- a/packages/storybook/src/react-components/alert/alert.stories.tsx +++ b/packages/storybook/src/react-components/alert/alert.stories.tsx @@ -1,6 +1,8 @@ import { LuxAlert, type LuxAlertProps, LuxHeading1, LuxParagraph } from '@lux-design-system/components-react'; import tokens from '@lux-design-system/design-tokens/dist/index.json'; import type { Meta, StoryObj } from '@storybook/react'; +import { VisualTypes } from './visual/Types'; +import { createVisualRegressionStory, VisualRegressionWrapper } from '../../utils'; type Story = StoryObj; @@ -8,7 +10,6 @@ const meta = { title: 'React Components/Alert', id: 'react-components-alert', component: LuxAlert, - subcomponents: {}, parameters: { tokens, tokensPrefix: 'utrecht-alert', @@ -112,3 +113,16 @@ export const ErrorAlert: Story = { }, }, }; + +export const Visual = createVisualRegressionStory(() => ( + <> +

Light

+ + + +

Dark

+ + + + +)); diff --git a/packages/storybook/src/react-components/alert/visual/Types.tsx b/packages/storybook/src/react-components/alert/visual/Types.tsx new file mode 100644 index 000000000..cc4ec71c1 --- /dev/null +++ b/packages/storybook/src/react-components/alert/visual/Types.tsx @@ -0,0 +1,17 @@ +import { LuxAlert, LuxAlertProps, LuxParagraph } from '@lux-design-system/components-react'; +import { PropsWithChildren } from 'react'; + +const VisualAlertTemplate = ({ children, type }: PropsWithChildren) => ( + + {children} + +); + +export const VisualTypes = () => ( + <> + Info Alert + Okay Alert + Warning Alert + Error Alert + +); diff --git a/packages/storybook/src/react-components/link/link.stories.tsx b/packages/storybook/src/react-components/link/link.stories.tsx index 240f68036..58e49da88 100644 --- a/packages/storybook/src/react-components/link/link.stories.tsx +++ b/packages/storybook/src/react-components/link/link.stories.tsx @@ -1,6 +1,8 @@ import { LuxLink } from '@lux-design-system/components-react'; import tokens from '@lux-design-system/design-tokens/dist/index.json'; import type { Meta, StoryObj } from '@storybook/react'; +import { VisualStates } from './visual/States'; +import { createVisualRegressionStory, VisualRegressionWrapper } from '../../utils'; type Story = StoryObj; @@ -204,3 +206,16 @@ export const LinkWithIconEnd: Story = { }, }, }; + +export const Visual = createVisualRegressionStory(() => ( + <> +

Light

+ + + +

Dark

+ + + + +)); diff --git a/packages/storybook/src/react-components/link/visual/States.tsx b/packages/storybook/src/react-components/link/visual/States.tsx new file mode 100644 index 000000000..d82f57d0f --- /dev/null +++ b/packages/storybook/src/react-components/link/visual/States.tsx @@ -0,0 +1,22 @@ +import { LuxLink } from '@lux-design-system/components-react'; + +export const VisualStates = () => ( +
+ Link +
+ Hover link +
+
+ Active link +
+
+ Visited link +
+
+ Focus link +
+
+ Focus visible link +
+
+);