Skip to content

Commit 2d31a77

Browse files
committed
fix(tasty): mod props priority
1 parent be6d4d0 commit 2d31a77

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/components/actions/ItemButton/ItemButton.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,17 @@ const ActionsWrapper = tasty({
4747
placeItems: 'stretch',
4848
preset: {
4949
'': 't3m',
50-
'[data-size="xsmall"]': 't4',
51-
'[data-size="xlarge"]': 't2m',
50+
'size=xsmall': 't4',
51+
'size=xlarge': 't2m',
5252
},
5353

5454
$size: {
5555
'': '$size-md',
56-
'[data-size="xsmall"]': '$size-xs',
57-
'[data-size="small"]': '$size-sm',
58-
'[data-size="medium"]': '$size-md',
59-
'[data-size="large"]': '$size-lg',
60-
'[data-size="xlarge"]': '$size-xl',
56+
'size=xsmall': '$size-xs',
57+
'size=small': '$size-sm',
58+
'size=medium': '$size-md',
59+
'size=large': '$size-lg',
60+
'size=xlarge': '$size-xl',
6161
},
6262

6363
Actions: {

src/tasty/tasty.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,9 +460,9 @@ function tastyElement<K extends StyleList, V extends VariantMap>(
460460
'data-element': (element as string | undefined) || defaultElement,
461461
'data-qa': (qa as string | undefined) || defaultQa,
462462
'data-qaval': (qaVal as string | undefined) || defaultQaVal,
463+
...(modProps || {}),
463464
...(otherDefaultProps as unknown as Record<string, unknown>),
464465
...(otherProps as unknown as Record<string, unknown>),
465-
...(modProps || {}),
466466
className: finalClassName,
467467
ref,
468468
} as Record<string, unknown>;

0 commit comments

Comments
 (0)