Skip to content

Commit

Permalink
feat(containedlist): spread rest props (#15703)
Browse files Browse the repository at this point in the history
  • Loading branch information
tay1orjones authored Feb 6, 2024
1 parent 28cf192 commit bd075c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/react/src/components/ContainedList/ContainedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ function ContainedList({
kind = variants[0],
label,
size,
...rest
}) {
const labelId = `${useId('contained-list')}-header`;
const prefix = usePrefix();
Expand All @@ -82,7 +83,7 @@ function ContainedList({
const renderedChildren = renderChildren(children);

return (
<div className={classes}>
<div className={classes} {...rest}>
<div className={`${prefix}--contained-list__header`}>
<div id={labelId} className={`${prefix}--contained-list__label`}>
{label}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ function ContainedListItem({
disabled = false,
onClick,
renderIcon: IconElement,
...rest
}) {
const prefix = usePrefix();

Expand All @@ -41,7 +42,7 @@ function ContainedListItem({
);

return (
<li className={classes}>
<li className={classes} {...rest}>
{isClickable ? (
<button
className={`${prefix}--contained-list-item__content`}
Expand Down

0 comments on commit bd075c5

Please sign in to comment.