@@ -159,3 +159,57 @@ DefaultSlot.args = {
159159 <UButton label="Submit" />
160160 ` ,
161161} ;
162+
163+ export const Grow : StoryFn < UColArgs > = ( args : UColArgs ) => ( {
164+ components : { UCol, UButton } ,
165+ setup : ( ) => ( { args } ) ,
166+ template : `
167+ <div class="flex flex-col h-[400px] border border-primary border-dashed rounded-medium p-4">
168+ <UCol gap="sm" class="border border-secondary border-dashed rounded-medium p-4">
169+ <UButton label="Col 1" />
170+ <UButton label="No grow" />
171+ </UCol>
172+ <UCol gap="sm" grow class="border border-secondary border-dashed rounded-medium p-4">
173+ <UButton label="Col 2" />
174+ <UButton label="With grow - fills available space" />
175+ </UCol>
176+ <UCol gap="sm" class="border border-secondary border-dashed rounded-medium p-4">
177+ <UButton label="Col 3" />
178+ <UButton label="No grow" />
179+ </UCol>
180+ </div>
181+ ` ,
182+ } ) ;
183+ Grow . parameters = {
184+ docs : {
185+ description : {
186+ story : "Allow flex item to grow to fill available space (flex-grow). The middle column grows to fill the remaining vertical space." ,
187+ } ,
188+ } ,
189+ } ;
190+
191+ export const Shrink : StoryFn < UColArgs > = ( args : UColArgs ) => ( {
192+ components : { UCol, UButton } ,
193+ setup : ( ) => ( { args } ) ,
194+ template : `
195+ <div class="flex flex-col h-[300px] border border-primary border-dashed rounded-medium p-4">
196+ <UCol gap="sm" shrink class="min-h-[200px] border border-secondary border-dashed rounded-medium p-4">
197+ <UButton label="Col 1" />
198+ <UButton label="With shrink - can shrink below min-height" />
199+ <UButton label="Shrinks when needed" />
200+ </UCol>
201+ <UCol gap="sm" class="min-h-[200px] border border-secondary border-dashed rounded-medium p-4">
202+ <UButton label="Col 2" />
203+ <UButton label="No shrink - maintains min-height" />
204+ <UButton label="Won't shrink" />
205+ </UCol>
206+ </div>
207+ ` ,
208+ } ) ;
209+ Shrink . parameters = {
210+ docs : {
211+ description : {
212+ story : "Allow flex item to shrink if necessary (flex-shrink). The first column can shrink below its min-height when space is constrained." ,
213+ } ,
214+ } ,
215+ } ;
0 commit comments