Skip to content

Commit

Permalink
Styling changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ianvexler committed Feb 13, 2024
1 parent 4e6f8cf commit 5c85e4f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion scss/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,4 @@ a.breadcrumb-item {

a.breadcrumb-item:hover {
text-decoration: underline;
color: var(--texmo-text-color);
}
8 changes: 0 additions & 8 deletions src/components/breadcrumb/Breadcrumb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,13 @@ const Breadcrumb = ({ children, ...rest }: BreadcrumbProps) => {
const childElement = child as React.ReactElement;
const childProps = childElement.props as BreadcrumbItemProps;

const isActive = childProps.active;

let className = childProps.className;
if (isActive) {
className = `${className} gray-text`;
}

let text = childProps.text;
if (index > 0) {
text = ` / ${text}`;
}

return React.cloneElement(childElement, {
text,
className,
key: index,
});
})}
Expand Down
2 changes: 1 addition & 1 deletion src/components/breadcrumb/components/BreadcrumbItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const BreadcrumbItem = ({
}: BreadcrumbItemProps) => {
if (active) {
return (
<span className={className} {...rest}>
<span className={`gray-text ${className}`} {...rest}>
{text}
</span>
);
Expand Down

0 comments on commit 5c85e4f

Please sign in to comment.