1+ import { Typography } from '@equinor/eds-core-react' ;
12import { info_circle } from '@equinor/eds-icons' ;
23import { Meta , StoryObj } from '@storybook/react-vite' ;
34
45import { InformationalNotice } from './InformationalNotice' ;
6+ import { spacings } from 'src/atoms/style' ;
7+ import { Chip } from 'src/molecules/Chip/Chip' ;
58import { VariantShowcase } from 'src/storybook/VariantShowcase' ;
69
710import { expect } from 'storybook/test' ;
@@ -37,7 +40,7 @@ export const Default: Story = {
3740 'd' ,
3841 info_circle . svgPathData as string
3942 ) ;
40- await expect ( canvas . getByText ( args . children ) ) . toBeInTheDocument ( ) ;
43+ await expect ( canvas . getByText ( args . children as string ) ) . toBeInTheDocument ( ) ;
4144 } ,
4245} ;
4346
@@ -57,3 +60,32 @@ export const Variants: Story = {
5760 />
5861 ) ,
5962} ;
63+
64+ export const ElementsAsChildren : Story = {
65+ args : {
66+ children : (
67+ < >
68+ < Typography variant = "body_long" >
69+ < b > Section mismatch.</ b > The current sections differ from Wellcom.
70+ Please review before proceeding.
71+ </ Typography >
72+ < div style = { { display : 'flex' , gap : spacings . small } } >
73+ < Typography variant = "body_long" >
74+ < b > Sections missing:</ b >
75+ </ Typography >
76+ < Chip > 18"</ Chip >
77+ < Chip > 8"</ Chip >
78+ </ div >
79+ </ >
80+ ) ,
81+ } ,
82+ decorators : ( StoryFn ) => (
83+ < div style = { { width : '400px' } } >
84+ < StoryFn />
85+ </ div >
86+ ) ,
87+ play : async ( { canvas } ) => {
88+ await expect ( canvas . getByText ( '18"' ) ) . toBeInTheDocument ( ) ;
89+ await expect ( canvas . getByText ( '8"' ) ) . toBeInTheDocument ( ) ;
90+ } ,
91+ } ;
0 commit comments