Skip to content

Commit

Permalink
Merge branch 'develop' into feature/SWED-2230-topbar_transparent
Browse files Browse the repository at this point in the history
  • Loading branch information
goldenraphti committed Oct 11, 2023
2 parents dfc45e3 + 53156c0 commit ee29c9a
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 44 deletions.
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
### Non breaking UI changes

- add possibility to disable rotation of the dropdown toggle icon on active state
- add possibility to style bank-id button as secondary

## Testing

Expand Down
64 changes: 43 additions & 21 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
Expand Up @@ -61,7 +61,7 @@
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/preset-env": "7.20.2",
"@babel/preset-react": "^7.18.6",
"@playwright/test": "^1.37.0",
"@playwright/test": "^1.38.1",
"@sentry/webpack-plugin": "^1.20.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
Expand Down
18 changes: 18 additions & 0 deletions src/App/ComponentsDocumentation/components/Buttons/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,24 @@ export const overviewButtons = {
},
],
},
{
id: "button-type",
title: "Button type",
values: [
{
name: "Primary",
value: {
type: "primary",
},
},
{
name: "Secondary",
value: {
type: "secondary",
},
},
],
},
],
},
title: "BankID button",
Expand Down
51 changes: 29 additions & 22 deletions src/less/components/button.less
Original file line number Diff line number Diff line change
Expand Up @@ -86,28 +86,8 @@
background-color: var(--btn-primary-color);
}

&.btn-bank-id {
display: flex;
justify-content: center;

i.bank-id {
height: 1.5rem;
width: 1.5rem;
display: inline-flex;
background-image: none;
margin-left: 0.5rem;
background-color: var(--btn-primary-text-color);

&-no,
&.no {
mask-image: url("../../icons/bank-id/bankid_no.svg");
}

&-se,
&.se {
mask-image: url("../../icons/bank-id/bankid_se.svg");
}
}
&.btn-bank-id i.bank-id {
background-color: var(--btn-primary-text-color);
}
}

Expand All @@ -126,6 +106,33 @@
box-shadow: inset 0 0 0 3px var(--btn-active-color);
border-color: var(--btn-active-color);
}

&.btn-bank-id i.bank-id {
background-color: var(--btn-secondary-text-color);
}
}

&:is(.btn-primary, .btn-secondary).btn-bank-id {
display: flex;
justify-content: center;

i.bank-id {
height: 1.5rem;
width: 1.5rem;
display: inline-flex;
background-image: none;
margin-left: 0.5rem;

&-no,
&.no {
mask-image: url("../../icons/bank-id/bankid_no.svg");
}

&-se,
&.se {
mask-image: url("../../icons/bank-id/bankid_se.svg");
}
}
}

&.btn-tertiary {
Expand Down

0 comments on commit ee29c9a

Please sign in to comment.