Skip to content

Commit

Permalink
fix(BreadcrumbItem): do not overwrite child className (#8578)
Browse files Browse the repository at this point in the history
* fix(BreadcrumbItem): do not overwrite child className

* refactor(BreadcrumbItem): reduce child classname to single line

* refactor(BreadcrumbItem): remove unnecessary optional chaining for child classname check

Co-authored-by: Josh Black <josh@josh.black>
  • Loading branch information
jinhei and joshblack authored May 10, 2021
1 parent dc447cb commit 1f172df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react/src/components/Breadcrumb/BreadcrumbItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const BreadcrumbItem = React.forwardRef(function BreadcrumbItem(
<li className={className} ref={ref} {...rest}>
{React.cloneElement(children, {
'aria-current': ariaCurrent,
className: `${prefix}--link`,
className: cx(`${prefix}--link`, children.props.className),
})}
</li>
);
Expand Down

0 comments on commit 1f172df

Please sign in to comment.