1- import { styled } from 'goober' ;
1+ import { css , styled } from 'goober' ;
22import * as React from 'react' ;
33
44import { Wizard } from '../../../dist' ;
55import { AnimatedStep , AsyncStep , Footer , Step } from '../../components' ;
66
7- const Grid = styled ( 'section' ) `
8- display: grid ;
9- grid-template-columns: repeat(1, 1fr) ;
7+ const Container = styled ( 'section' ) `
8+ display: flex ;
9+ flex-direction: column ;
1010 width: 100%;
1111` ;
1212
@@ -21,27 +21,45 @@ const Title = styled('h2')`
2121 }
2222` ;
2323
24- const Item = styled ( 'div' ) `
25- display: grid ;
26- grid-template-rows: min-content ;
24+ const Item = styled ( 'div' ) < { showDivider : boolean } > `
25+ display: flex ;
26+ flex-direction: column ;
2727
2828 &::after {
29- content: '';
3029 margin: 3rem 0 2rem;
30+ content: '';
3131 background-image: linear-gradient(48.66deg, var(--purple), var(--blue));
3232 width: 100%;
3333 position: relative;
34- height: 1px;
34+ height: ${ ( { showDivider } ) => ( showDivider ? ' 1px' : 0 ) } ;
3535 }
36+
37+ ${ ( { showDivider } ) =>
38+ showDivider
39+ ? `
40+ &::after {
41+ margin: 3rem 0 2rem;
42+ content: '';
43+ background-image: linear-gradient(
44+ 48.66deg,
45+ var(--purple),
46+ var(--blue)
47+ );
48+ width: 100%;
49+ position: relative;
50+ height: 1px;
51+ }
52+ `
53+ : '' }
3654` ;
3755
3856const WizardModule = ( ) => {
3957 return (
40- < Grid >
58+ < Container >
4159 < Title >
4260 Simple wizard < span > mix of async and sync steps</ span >
4361 </ Title >
44- < Item >
62+ < Item showDivider >
4563 < Wizard footer = { < Footer /> } >
4664 < AsyncStep number = { 1 } />
4765 < Step number = { 2 } />
@@ -51,9 +69,9 @@ const WizardModule = () => {
5169 </ Item >
5270
5371 < Title >
54- Animated wizard < span > animations by framer motion</ span >
72+ Animated wizard < span > animation by framer motion</ span >
5573 </ Title >
56- < Item >
74+ < Item showDivider = { false } >
5775 < Wizard footer = { < Footer /> } >
5876 < AnimatedStep >
5977 < Step number = { 1 } withCallback = { false } />
@@ -69,7 +87,7 @@ const WizardModule = () => {
6987 </ AnimatedStep >
7088 </ Wizard >
7189 </ Item >
72- </ Grid >
90+ </ Container >
7391 ) ;
7492} ;
7593
0 commit comments