1
1
import {
2
2
LuxHeading1 ,
3
+ LuxHeading2 ,
3
4
LuxParagraph ,
4
5
type LuxSectionProps ,
5
6
LuxSection as Section ,
6
7
} from '@lux-design-system/components-react' ;
7
8
import tokens from '@lux-design-system/design-tokens/dist/index.json' ;
8
9
import type { Meta , StoryObj } from '@storybook/react' ;
9
10
import { type HTMLAttributes , type PropsWithChildren } from 'react' ;
11
+ import { VisualStates } from './visual/States' ;
12
+ import { createVisualRegressionStory , VisualRegressionWrapper } from '../../utils' ;
10
13
11
14
const LuxSection = ( props : PropsWithChildren < LuxSectionProps > & HTMLAttributes < HTMLDivElement > ) => (
12
15
< Section { ...props } />
@@ -18,7 +21,6 @@ const meta = {
18
21
title : 'React Components/Section' ,
19
22
id : 'react-components-section' ,
20
23
component : LuxSection ,
21
- subcomponents : { } ,
22
24
parameters : {
23
25
tokens,
24
26
tokensPrefix : 'react-section' ,
@@ -56,7 +58,7 @@ export const Playground: Story = {
56
58
</ LuxParagraph >
57
59
</ div > ,
58
60
< div >
59
- < LuxHeading1 > Morbi commodo</ LuxHeading1 >
61
+ < LuxHeading2 > Morbi commodo</ LuxHeading2 >
60
62
< LuxParagraph >
61
63
Morbi commodo augue eget consequat tempus. Nulla scelerisque cursus fermentum. Aenean placerat ligula libero,
62
64
sit amet malesuada neque maximus et. Phasellus at massa nulla. Quisque sagittis tempor ante, quis sollicitudin
@@ -70,9 +72,25 @@ export const Playground: Story = {
70
72
] ,
71
73
} ,
72
74
parameters : {
75
+ backgrounds : {
76
+ default : 'canvas' ,
77
+ } ,
73
78
docs : {
74
79
sourceState : 'shown' ,
75
80
} ,
76
81
} ,
77
82
tags : [ '!autodocs' ] ,
78
83
} ;
84
+
85
+ export const Visual = createVisualRegressionStory ( ( ) => (
86
+ < >
87
+ < h4 className = "utrecht-heading-3" > Light</ h4 >
88
+ < VisualRegressionWrapper className = "lux-theme--logius-light" >
89
+ < VisualStates />
90
+ </ VisualRegressionWrapper >
91
+ < h4 className = "utrecht-heading-3" > Dark</ h4 >
92
+ < VisualRegressionWrapper className = "lux-theme--logius-dark" >
93
+ < VisualStates />
94
+ </ VisualRegressionWrapper >
95
+ </ >
96
+ ) ) ;
0 commit comments