Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breadcrumb #20

Merged
merged 5 commits into from
May 1, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix styles
  • Loading branch information
Zina88 committed May 1, 2023
commit 024c970703b9ca397db7bf22e1a6e13d39bec457
7 changes: 4 additions & 3 deletions src/components/ProductPage/Breadcrumb/Breadcrumb.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
BreadcrumbWrapper,
LinkBack,
LinkName,
WrapperNameLink,
} from './Breadcrumb.styled';
import { HOME } from 'utils/consts';

Expand Down Expand Up @@ -35,10 +36,10 @@ const BreadcrumbSection = ({ product }) => {
</>
)}

<Breadcrumb.Item as="li" active style={{ display: 'flex' }}>
<WrapperNameLink active>
<LinkName>{nameProduct}</LinkName>
</Breadcrumb.Item>
</BreadcrumbWrapper>{' '}
</WrapperNameLink>
</BreadcrumbWrapper>
</Container>
</BreadcrumbSectionWrapper>
);
Expand Down
17 changes: 16 additions & 1 deletion src/components/ProductPage/Breadcrumb/Breadcrumb.styled.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ export const LinkBack = styled(Breadcrumb.Item)`
color: ${p => p.theme.colors.info};
}

&:nth-child(2) {
color: #c1c8ce;
}

&:nth-child(2) a {
margin-left: 8px;
}
Expand All @@ -38,6 +42,18 @@ export const LinkBack = styled(Breadcrumb.Item)`
}
`;

export const WrapperNameLink = styled(Breadcrumb.Item)`
display: flex;

&::before {
margin-right: 8px;
}

&.active {
color: #c1c8ce;
}
`;

export const LinkName = styled.h3`
text-transform: capitalize;
font-size: 16px;
Expand All @@ -47,7 +63,6 @@ export const LinkName = styled.h3`
color: ${p => p.theme.colors.secondary};

@media (min-width: 576px) {
margin-left: 8px;
font-size: 18px;
}
`;