@@ -14,19 +14,19 @@ export const Chromatic = () => (
1414 < Container >
1515 < DxcFlex >
1616 < Placeholder />
17- < Placeholder width = "50px" />
17+ < Placeholder minWidth = "50px" />
1818 < Placeholder />
19- < Placeholder width = "50px" />
20- < Placeholder width = "50px" />
19+ < Placeholder minWidth = "50px" />
20+ < Placeholder minWidth = "50px" />
2121 </ DxcFlex >
2222 </ Container >
2323 < Title title = "Direction column, wrap, justify content end, align items center and gap" level = { 4 } />
2424 < Container >
2525 < DxcFlex direction = "column" wrap = "wrap" justifyContent = "end" alignItems = "center" gap = "20px" >
2626 < Placeholder />
27- < Placeholder width = "100px" />
27+ < Placeholder minWidth = "100px" />
2828 < Placeholder />
29- < Placeholder width = "100px" />
29+ < Placeholder minWidth = "100px" />
3030 < Placeholder />
3131 </ DxcFlex >
3232 </ Container >
@@ -37,44 +37,44 @@ export const Chromatic = () => (
3737 < Placeholder />
3838 < Placeholder />
3939 < Placeholder />
40- < Placeholder width = "100px" />
40+ < Placeholder minWidth = "100px" />
4141 < Placeholder />
4242 < Placeholder />
43- < Placeholder width = "100px" />
43+ < Placeholder minWidth = "100px" />
4444 < Placeholder />
4545 < Placeholder />
46- < Placeholder width = "100px" />
46+ < Placeholder minWidth = "100px" />
4747 < Placeholder />
4848 </ DxcFlex >
4949 </ Container >
5050 < Title title = "Basis 100%, order, grow and align self" level = { 4 } />
5151 < Container height = "75px" >
5252 < DxcFlex basis = "100%" >
5353 < DxcFlex order = { 3 } grow = { 1 } alignSelf = "flex-end" >
54- < PlaceholderGrowAndShrink > order 3, grow 1, align self end</ PlaceholderGrowAndShrink >
54+ < Placeholder width = "100%" minWidth = "0" > order 3, grow 1, align self end</ Placeholder >
5555 </ DxcFlex >
5656 < DxcFlex order = { - 1 } grow = { 4 } >
57- < PlaceholderGrowAndShrink > order -1, grow 4</ PlaceholderGrowAndShrink >
57+ < Placeholder width = "100%" minWidth = "0" > order -1, grow 4</ Placeholder >
5858 </ DxcFlex >
5959 < DxcFlex order = { 5 } grow = { 1 } >
60- < PlaceholderGrowAndShrink > order 5, grow 1</ PlaceholderGrowAndShrink >
60+ < Placeholder width = "100%" minWidth = "0" > order 5, grow 1</ Placeholder >
6161 </ DxcFlex >
6262 < DxcFlex order = { 2 } grow = { 2 } >
63- < PlaceholderGrowAndShrink > order 2. grow 2</ PlaceholderGrowAndShrink >
63+ < Placeholder width = "100%" minWidth = "0" > order 2. grow 2</ Placeholder >
6464 </ DxcFlex >
6565 </ DxcFlex >
6666 </ Container >
6767 < Title title = "Basis and shrink" level = { 4 } />
6868 < Container >
6969 < DxcFlex basis = "600px" >
7070 < DxcFlex shrink = { 4 } basis = "400px" >
71- < PlaceholderGrowAndShrink > shrink 4</ PlaceholderGrowAndShrink >
71+ < Placeholder width = "100%" minWidth = "0" > shrink 4</ Placeholder >
7272 </ DxcFlex >
7373 < DxcFlex shrink = { 2 } basis = "400px" >
74- < PlaceholderGrowAndShrink > shrink 2</ PlaceholderGrowAndShrink >
74+ < Placeholder width = "100%" minWidth = "0" > shrink 2</ Placeholder >
7575 </ DxcFlex >
7676 < DxcFlex shrink = { 1 } basis = "400px" >
77- < PlaceholderGrowAndShrink > shrink 1</ PlaceholderGrowAndShrink >
77+ < Placeholder width = "100%" minWidth = "0" > shrink 1</ Placeholder >
7878 </ DxcFlex >
7979 </ DxcFlex >
8080 </ Container >
@@ -88,16 +88,11 @@ const Container = styled.div<{ height?: string }>`
8888 ${ ( { height } ) => ( height ? `height: ${ height } ` : "max-height: 150px" ) } ;
8989` ;
9090
91- const Placeholder = styled . div < { width ?: string } > `
91+ const Placeholder = styled . div < { minWidth ?: string , width ?: string } > `
9292 height: 40px;
93- min-width: ${ ( { width } ) => width || "200px" } ;
94- border: 1px solid #a46ede;
95- background-color: #e5d5f6;
96- ` ;
97-
98- const PlaceholderGrowAndShrink = styled . div `
99- height: 40px;
100- width: 100%;
93+ min-width: ${ ( { minWidth } ) => minWidth ?? "200px" } ;
94+ width: ${ ( { width } ) => width } ;
10195 border: 1px solid #a46ede;
96+ border-radius: 0.5rem;
10297 background-color: #e5d5f6;
10398` ;
0 commit comments