@@ -79,12 +79,17 @@ const DROPZONE_SVG = `
7979// swc-illustrated-message slots: default (slot="") for SVG, "heading" for h2-h6, "description" for text.
8080// The browse button is a sibling of swc-illustrated-message inside swc-dropzone; the button-group
8181// slot is planned but not yet implemented on swc-illustrated-message.
82- const makeDropzoneSlot = ( headingText : string ) => html `
82+ // size is passed to swc-button to match the dropzone size; swc-illustrated-message receives
83+ // size automatically via swc-dropzone's slotchange propagation.
84+ const makeDropzoneSlot = (
85+ headingText : string ,
86+ size : DropzoneSize = 'm'
87+ ) => html `
8388 < swc-illustrated-message >
8489 ${ unsafeHTML ( DROPZONE_SVG ) }
8590 < h2 slot ="heading "> ${ headingText } </ h2 >
8691 </ swc-illustrated-message >
87- < swc-button variant ="accent "> Browse files</ swc-button >
92+ < swc-button variant ="accent " size = ${ size } > Browse files</ swc-button >
8893` ;
8994
9095// HTML string version used by the Playground so template(args) can spread all args.
@@ -153,12 +158,12 @@ export const Sizes: Story = {
153158 aria-label ="${ sizeLabels [ size ] } drop zone"
154159 style="min-inline-size: 260px;"
155160 >
156- ${ makeDropzoneSlot ( sizeLabels [ size ] ) }
161+ ${ makeDropzoneSlot ( sizeLabels [ size ] , size ) }
157162 </ swc-dropzone >
158163 `
159164 ) }
160165 ` ,
161- parameters : { flexLayout : 'row-wrap ' } ,
166+ parameters : { flexLayout : 'column-center ' } ,
162167 tags : [ 'options' ] ,
163168} ;
164169
0 commit comments