Skip to content

Commit

Permalink
Create variant for link with 'btn' class (#704)
Browse files Browse the repository at this point in the history
  • Loading branch information
alinekeller authored Feb 13, 2024
1 parent c79d1d4 commit 8a5f63f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 2 additions & 0 deletions assets/components/atoms/link/link-button.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<a class="btn btn-primary" href="#">Primary button link</a>
<a class="btn btn-secondary" href="#">Secondary button link</a>
6 changes: 1 addition & 5 deletions assets/components/atoms/link/link.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
@charset 'utf-8';

// All links are underlined by default. Supported browsers will have the right color. https://caniuse.com/#feat=text-decoration
a,
a:visited {
color: $black;
text-decoration: underline;
background-color: transparent;
a {
text-decoration-color: $link-hover-color;
transition:
text-decoration-color 0.2s ease-in-out,
Expand Down
6 changes: 6 additions & 0 deletions assets/components/atoms/link/link.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@ variants:
- name: login
title: Login link
notes:
- name: button
title: Button link
notes: |
Use the classes `btn`, `btn-primary` or `btn-secondary` to create a link with the look of a button.
⚠️ Button links should be used to target a page or section of a page – like a regular link. To trigger an action, use an [HTML button](#/atoms/button).

0 comments on commit 8a5f63f

Please sign in to comment.