Skip to content

Commit

Permalink
fix: proper inherit attributes (#3028)
Browse files Browse the repository at this point in the history
  • Loading branch information
Szymon-dziewonski authored Nov 3, 2023
1 parent 4ce0eb3 commit dd5ab48
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/cyan-carpets-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@storefront-ui/react': patch
---

fix order inherit of attributes
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const SfAccordionItem = forwardRef<HTMLDetailsElement, SfAccordionItemProps>((pr
};

return (
<details ref={ref} open={open} {...attributes} data-testid="accordion-item">
<details ref={ref} open={open} data-testid="accordion-item" {...attributes}>
<summary
onClick={handleClick}
className={classNames(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ const SfSwitch = forwardRef<HTMLInputElement, SfSwitchProps>(
)}
type="checkbox"
role="switch"
{...attributes}
data-testid="switch"
aria-checked={attributes?.checked}
{...attributes}
/>
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export default forwardRef<HTMLTextAreaElement, SfTextareaProps>(
sizeClasses[size],
className,
])}
{...attributes}
data-testid="textarea"
{...attributes}
/>
);
},
Expand Down

0 comments on commit dd5ab48

Please sign in to comment.