From 4011dc2315c5528b17ef8171577f19befc66d99c Mon Sep 17 00:00:00 2001 From: Carl-OW <142233642+Carl-OW@users.noreply.github.com> Date: Mon, 11 Nov 2024 14:00:16 +0100 Subject: [PATCH 1/2] Link element instead of Button --- src/components/Breadcrumb/_breadcrumb.scss | 21 --------------------- src/components/Breadcrumb/index.jsx | 13 +++---------- 2 files changed, 3 insertions(+), 31 deletions(-) diff --git a/src/components/Breadcrumb/_breadcrumb.scss b/src/components/Breadcrumb/_breadcrumb.scss index c44903ba..e6fb74e1 100644 --- a/src/components/Breadcrumb/_breadcrumb.scss +++ b/src/components/Breadcrumb/_breadcrumb.scss @@ -7,24 +7,3 @@ font-stretch: normal; 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; - - &:focus { - outline: 2px solid rgb(146 114 252 / 100%); - outline-offset: 4px; - border-radius: 2px; - } -} diff --git a/src/components/Breadcrumb/index.jsx b/src/components/Breadcrumb/index.jsx index 4fce0d2c..7635dc4d 100644 --- a/src/components/Breadcrumb/index.jsx +++ b/src/components/Breadcrumb/index.jsx @@ -15,19 +15,12 @@ const Breadcrumb = ({ className, items, mobileCompressedView = false }) => { const shouldShowCompressed = isMobile && mobileCompressedView && items.length > 1 - const handleNavigation = (link) => { - window.location.href = link - } - return (
{shouldShowCompressed ? ( -
- - -
+ }> + {items[items.length - 2].text} + ) : ( <> {items.slice(0, -1).map((item) => ( From 214e9712f7695f8adda2859c76bc8a82af35a0c7 Mon Sep 17 00:00:00 2001 From: Carl-OW <142233642+Carl-OW@users.noreply.github.com> Date: Mon, 11 Nov 2024 14:08:29 +0100 Subject: [PATCH 2/2] 2.4.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6e3ad0dc..1d712dda 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@statisticsnorway/ssb-component-library", - "version": "2.4.0", + "version": "2.4.1", "description": "Component library for SSB (Statistics Norway)", "main": "lib/bundle.js", "scripts": {