Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a "bold" link skin #531

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions addon/components/au-button.gts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const SKINS = [
'naked',
'link',
'link-secondary',
'link-bold',
] as const;

export interface AuButtonSignature {
Expand Down
2 changes: 2 additions & 0 deletions addon/components/au-link-external.gts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import AuIcon, { type AuIconSignature } from './au-icon';
const SKIN_CLASSES = {
primary: 'au-c-link',
secondary: 'au-c-link au-c-link--secondary',
bold: 'au-c-link au-c-link--bold',
button: 'au-c-button au-c-button--primary',
'button-secondary': 'au-c-button au-c-button--secondary',
'button-naked': 'au-c-button au-c-button--naked',
Expand All @@ -18,6 +19,7 @@ export interface AuLinkExternalSignature {
skin?:
| 'primary'
| 'secondary'
| 'bold'
| 'button'
| 'button-secondary'
| 'button-naked';
Expand Down
2 changes: 2 additions & 0 deletions addon/components/au-link.gts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import linkToModels from '../private/helpers/link-to-models';
const SKIN_CLASSES = {
primary: 'au-c-link',
secondary: 'au-c-link au-c-link--secondary',
bold: 'au-c-link au-c-link--bold',
button: 'au-c-button au-c-button--primary',
'button-secondary': 'au-c-button au-c-button--secondary',
'button-naked': 'au-c-button au-c-button--naked',
Expand All @@ -17,6 +18,7 @@ export interface AuLinkSignature {
skin?:
| 'primary'
| 'secondary'
| 'bold'
| 'button'
| 'button-secondary'
| 'button-naked';
Expand Down
24 changes: 23 additions & 1 deletion stories/5-components/Buttons/AuButton.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ export default {
text: { control: 'text', description: '' },
skin: {
control: 'select',
options: ['primary', 'secondary', 'naked', 'link', 'link-secondary'],
options: [
'primary',
'secondary',
'naked',
'link',
'link-bold',
'link-secondary',
],
description: 'Defines the style of the button',
},
size: {
Expand Down Expand Up @@ -136,3 +143,18 @@ SecondaryLink.args = {
disabled: false,
loading: false,
};

export const BoldLink = Template.bind({});
BoldLink.args = {
text: 'Bold link',
skin: 'link-bold',
size: '',
icon: '',
iconAlignment: 'left',
hideText: false,
width: '',
wrap: '',
alert: false,
disabled: false,
loading: false,
};
16 changes: 16 additions & 0 deletions stories/5-components/Links/AuLink.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default {
options: [
'primary',
'secondary',
'bold',
'button',
'button-secondary',
'button-naked',
Expand Down Expand Up @@ -98,6 +99,21 @@ Secondary.parameters = {
chromatic: { disableSnapshot: true },
};

export const Bold = Template.bind({});
Bold.args = {
text: 'Bold',
route: 'index',
skin: 'bold',
icon: 'login',
iconAlignment: 'left',
hideText: false,
width: '',
active: false,
};
Bold.parameters = {
chromatic: { disableSnapshot: true },
};

export const PrimaryButton = Template.bind({});
PrimaryButton.args = {
text: 'Primary Button',
Expand Down
13 changes: 13 additions & 0 deletions stories/5-components/Links/AuLinkExternal.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default {
options: [
'primary',
'secondary',
'bold',
'button',
'button-secondary',
'button-naked',
Expand Down Expand Up @@ -84,6 +85,18 @@ Secondary.args = {
width: '',
};

export const Bold = Template.bind({});
Bold.args = {
text: 'External link',
href: 'https://www.vlaanderen.be/',
route: 'index',
skin: 'bold',
icon: 'manual',
iconAlignment: 'left',
hideText: false,
width: '',
};

export const PrimaryButton = Template.bind({});
PrimaryButton.args = {
text: 'External link',
Expand Down
17 changes: 15 additions & 2 deletions styles/components/_c-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ $au-button-link-icon-only-width: $au-button-link-height !default;
}

// Link button
.au-c-button--link {
.au-c-button--link,
.au-c-button--link-bold {
font-size: inherit;
border-color: transparent;
padding: 0 $au-unit-tiny 0;
Expand Down Expand Up @@ -236,6 +237,17 @@ $au-button-link-icon-only-width: $au-button-link-height !default;
}
}

.au-c-button--link-bold {
font-weight: var(--au-medium);
text-decoration: none;

&:hover,
&:focus-visible,
&:active {
text-decoration: underline;
}
}

// Link secondary button
.au-c-button--link-secondary {
font-size: inherit;
Expand Down Expand Up @@ -364,7 +376,8 @@ $au-button-link-icon-only-width: $au-button-link-height !default;
}

&.au-c-button--link,
&.au-c-button--link-secondary {
&.au-c-button--link-secondary,
&.au-c-button--link-bold {
background-color: transparent;

&,
Expand Down
10 changes: 10 additions & 0 deletions styles/components/_c-link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ $au-link-secondary-active-color: var(--au-gray-900) !default;
}
}

.au-c-link--bold {
text-decoration: none;
font-weight: var(--au-medium);

&:hover,
&:focus {
text-decoration: underline;
}
}

.au-c-link--icon-only {
.au-c-icon {
width: 1.8rem;
Expand Down
Loading