Skip to content

Commit

Permalink
fix: allign breadcrumbs chevron
Browse files Browse the repository at this point in the history
  • Loading branch information
onim-at authored and benfurber committed Sep 6, 2024
1 parent 39e0cd1 commit 4a14c7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/components/src/Breadcrumbs/Breadcrumbs.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Flex } from 'theme-ui'
import { Flex } from 'theme-ui'

import { Icon } from '../Icon/Icon'
import { BreadcrumbItem } from './BreadcrumbsItem'
Expand All @@ -22,7 +22,7 @@ export const Breadcrumbs = ({ steps }: BreadcrumbsProps) => {
{steps.map((step, index) => {
const isLast = index === steps.length - 1
return (
<Box key={index}>
<Flex key={index} sx={{ alignItems: 'center' }}>
<BreadcrumbItem text={step.text} link={step.link} isLast={isLast} />
{!isLast && (
<Icon
Expand All @@ -32,7 +32,7 @@ export const Breadcrumbs = ({ steps }: BreadcrumbsProps) => {
data-testid="breadcrumbsChevron"
/>
)}
</Box>
</Flex>
)
})}
</Flex>
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/Breadcrumbs/BreadcrumbsItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const BreadcrumbButton = ({ text, link }: BreadcrumbButtonProps) => {

export const BreadcrumbItem = ({ text, link, isLast }: BreadcrumbItemProps) => (
<Box
style={{ display: 'inline-flex', marginRight: '10px' }}
style={{ display: 'inline-flex', marginRight: '3px' }}
data-testid="breadcrumbsItem"
data-cy="breadcrumbsItem"
>
Expand Down

0 comments on commit 4a14c7d

Please sign in to comment.