Skip to content

Commit

Permalink
Merge pull request #1382 from statisticsnorway/MIM-2040-breadcrumb-re…
Browse files Browse the repository at this point in the history
…move-unneeded-classes

Breadcrumb remove unneeded classes
  • Loading branch information
Carl-OW authored Nov 19, 2024
2 parents 1698a60 + 9190d70 commit d8ffb9a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 39 deletions.
20 changes: 0 additions & 20 deletions lib/bundle.css
Original file line number Diff line number Diff line change
Expand Up @@ -183,26 +183,6 @@ a {
line-height: 1.25;
}

.ssb-breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
content: none !important;
}

.breadcrumb-button {
cursor: pointer;
color: inherit;
text-decoration: none;
background: none;
border: none;
padding: 0;
font-size: 16px;
font-family: "Open Sans", sans-serif;
}
.breadcrumb-button:focus {
outline: 2px solid rgb(146, 114, 252);
outline-offset: 4px;
border-radius: 2px;
}

.ssb-btn {
font-family: "Roboto", sans-serif !important;
font-stretch: normal;
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@statisticsnorway/ssb-component-library",
"version": "2.4.1",
"version": "2.4.2",
"description": "Component library for SSB (Statistics Norway)",
"main": "lib/bundle.js",
"scripts": {
Expand Down
16 changes: 5 additions & 11 deletions src/components/Breadcrumb/__snapshots__/breadcrumb.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ exports[`Breadcrumb component Matches the snapshot 1`] = `
<div
class="ssb-breadcrumbs"
>
<div
class="breadcrumb-item"
>
<div>
<a
class="ssb-link breadcrumb-link"
class="ssb-link"
href=" "
>
<span
Expand All @@ -20,11 +18,9 @@ exports[`Breadcrumb component Matches the snapshot 1`] = `
</a>
 / 
</div>
<div
class="breadcrumb-item"
>
<div>
<a
class="ssb-link breadcrumb-link"
class="ssb-link"
href=" "
>
<span
Expand All @@ -35,9 +31,7 @@ exports[`Breadcrumb component Matches the snapshot 1`] = `
</a>
 / 
</div>
<span
class="breadcrumb-text"
>
<span>
breadcrumb 3
</span>
</div>
Expand Down
8 changes: 3 additions & 5 deletions src/components/Breadcrumb/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,12 @@ const Breadcrumb = ({ className, items, mobileCompressedView = false }) => {
) : (
<>
{items.slice(0, -1).map((item) => (
<div key={item.text} className='breadcrumb-item'>
<Link href={item.link} className='breadcrumb-link'>
{item.text}
</Link>
<div key={item.text}>
<Link href={item.link}>{item.text}</Link>
&nbsp;/&nbsp;
</div>
))}
<span className='breadcrumb-text'>{items[items.length - 1].text}</span>
<span>{items[items.length - 1].text}</span>
</>
)}
</div>
Expand Down

0 comments on commit d8ffb9a

Please sign in to comment.