Skip to content

Commit dd5ab48

Browse files
fix: proper inherit attributes (#3028)
1 parent 4ce0eb3 commit dd5ab48

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

.changeset/cyan-carpets-collect.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@storefront-ui/react': patch
3+
---
4+
5+
fix order inherit of attributes

packages/sfui/frameworks/react/components/SfAccordionItem/SfAccordionItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const SfAccordionItem = forwardRef<HTMLDetailsElement, SfAccordionItemProps>((pr
1212
};
1313

1414
return (
15-
<details ref={ref} open={open} {...attributes} data-testid="accordion-item">
15+
<details ref={ref} open={open} data-testid="accordion-item" {...attributes}>
1616
<summary
1717
onClick={handleClick}
1818
className={classNames(

packages/sfui/frameworks/react/components/SfSwitch/SfSwitch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ const SfSwitch = forwardRef<HTMLInputElement, SfSwitchProps>(
1515
)}
1616
type="checkbox"
1717
role="switch"
18-
{...attributes}
1918
data-testid="switch"
2019
aria-checked={attributes?.checked}
20+
{...attributes}
2121
/>
2222
),
2323
);

packages/sfui/frameworks/react/components/SfTextarea/SfTextarea.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ export default forwardRef<HTMLTextAreaElement, SfTextareaProps>(
2626
sizeClasses[size],
2727
className,
2828
])}
29-
{...attributes}
3029
data-testid="textarea"
30+
{...attributes}
3131
/>
3232
);
3333
},

0 commit comments

Comments
 (0)