Skip to content

Commit

Permalink
feat: center chefron with content
Browse files Browse the repository at this point in the history
  • Loading branch information
danimuller20 committed Sep 1, 2023
1 parent b757d3a commit b2a7f78
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/ocean-core/src/components/breadcrumb.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
color: $color-interface-dark-up;
}

div {
&__item {
align-items: center;
display: flex;
gap: 4px;
Expand Down
4 changes: 2 additions & 2 deletions packages/ocean-react/src/Breadcrumb/Breadcrumb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ const Breadcrumb = forwardRef<HTMLDivElement, BreadcrumbProps>(
);

return typeof item === 'string' ? (
<div key={`string-item-${item}`}>
<div className="ods-breadcrumb__item" key={`string-item-${item}`}>
<span>{item}</span> {showIcon}
</div>
) : (
<div key={`tag-item-${index + 1}`}>
<div className="ods-breadcrumb__item" key={`tag-item-${index + 1}`}>
{item} {showIcon}
</div>
);
Expand Down
20 changes: 15 additions & 5 deletions packages/ocean-react/src/Breadcrumb/__tests__/Breadcrumb.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ test('renders breadcrumb with array elements', () => {
class="ods-breadcrumb custom-class"
data-testid="breadcrumb-test"
>
<div>
<div
class="ods-breadcrumb__item"
>
<span>
item 1
</span>
Expand All @@ -40,7 +42,9 @@ test('renders breadcrumb with array elements', () => {
/>
</svg>
</div>
<div>
<div
class="ods-breadcrumb__item"
>
<span>
item 2
</span>
Expand All @@ -65,7 +69,9 @@ test('renders breadcrumb with array string', () => {
class="ods-breadcrumb custom-class"
data-testid="breadcrumb-test"
>
<div>
<div
class="ods-breadcrumb__item"
>
<span>
item 1
</span>
Expand All @@ -84,7 +90,9 @@ test('renders breadcrumb with array string', () => {
/>
</svg>
</div>
<div>
<div
class="ods-breadcrumb__item"
>
<span>
item 2
</span>
Expand All @@ -103,7 +111,9 @@ test('renders breadcrumb with array string', () => {
/>
</svg>
</div>
<div>
<div
class="ods-breadcrumb__item"
>
<span>
item 3
</span>
Expand Down

0 comments on commit b2a7f78

Please sign in to comment.