Skip to content

Commit 68d38ea

Browse files
committed
feat(ui): Add an lg size to the Mosaic Item
`lg` is a taller row with a wider gap and its own inline padding. The media column narrows to match at `md` and `lg`.
1 parent 6e5f74f commit 68d38ea

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

packages/swingset/src/stories/item.stories.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export function Interactive() {
7676
export function Sizes() {
7777
return (
7878
<div className='w-full'>
79-
{(['md', 'xs'] as const).map(size => (
79+
{(['lg', 'md', 'xs'] as const).map(size => (
8080
<Item.Root
8181
key={size}
8282
size={size}
@@ -271,7 +271,10 @@ export function Group() {
271271

272272
export function Outline() {
273273
return (
274-
<Item.Root variant='outline'>
274+
<Item.Root
275+
variant='outline'
276+
size='lg'
277+
>
275278
<Item.Media>
276279
<Avatar.Root
277280
shape='square'
@@ -300,7 +303,7 @@ export function OutlineGroup() {
300303
return (
301304
<div className='w-full'>
302305
<Item.Group variant='outline'>
303-
<Item.Root>
306+
<Item.Root size='lg'>
304307
<Item.Media>
305308
<Avatar.Root
306309
size='fit'
@@ -327,6 +330,7 @@ export function OutlineGroup() {
327330
</Item.Actions>
328331
</Item.Root>
329332
<Item.Root
333+
size='lg'
330334
render={({ children, ...props }) => (
331335
<a
332336
{...props}

packages/ui/src/mosaic/components/item/item.styles.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ export const item = stylex.create({
7171
gap: space['3'],
7272
height: space['13'],
7373
},
74+
lg: {
75+
gap: space['3'],
76+
paddingInline: space['3'],
77+
height: space['16'],
78+
},
7479
});
7580

7681
export const media = stylex.create({
@@ -83,7 +88,8 @@ export const media = stylex.create({
8388
},
8489

8590
xs: { width: space['6'] },
86-
md: { width: space['10'] },
91+
md: { width: space['9.5'] },
92+
lg: { width: space['9.5'] },
8793
});
8894

8995
export const content = stylex.create({

0 commit comments

Comments
 (0)