Skip to content

Commit a99596d

Browse files
palbizuPatricio Albizu
andauthored
feat: button new style (#1121)
* feat: Adding new button style * feat: changing style name Co-authored-by: Patricio Albizu <[email protected]>
1 parent ba10af3 commit a99596d

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

projects/components/src/button/button.component.scss

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@
6464
@include button-style($gray-1, $gray-2, $gray-7, $gray-7);
6565
}
6666

67+
&.quaternary {
68+
@include button-style($blue-1, $blue-2, $blue-4, $blue-4);
69+
}
70+
6771
&.destructive {
6872
@include button-style($red-5, $red-7, white, white);
6973
}
@@ -86,6 +90,10 @@
8690
@include button-style(inherit, $gray-1, $gray-7, $gray-7, $gray-2);
8791
}
8892

93+
&.quaternary {
94+
@include button-style(inherit, $blue-2, $gray-7, $gray-7, $blue-1);
95+
}
96+
8997
&.destructive {
9098
@include button-style(inherit, $red-1, $gray-7, $gray-7, $red-5);
9199
}
@@ -108,6 +116,10 @@
108116
@include button-style(inherit, $gray-1, $gray-5, $gray-5);
109117
}
110118

119+
&.quaternary {
120+
@include button-style(inherit, $blue-2, $gray-7, $gray-7);
121+
}
122+
111123
&.destructive {
112124
@include button-style(inherit, $red-1, $red-5, $red-5);
113125
}
@@ -123,6 +135,10 @@
123135
@include button-style(inherit, inherit, $blue-5, $blue-4);
124136
}
125137

138+
&.primary-reversed {
139+
@include button-style(inherit, inherit, $blue-1, $blue-2);
140+
}
141+
126142
&.secondary {
127143
@include button-style(inherit, inherit, $gray-7, $gray-5);
128144
}
@@ -131,6 +147,10 @@
131147
@include button-style(inherit, inherit, $gray-5, $gray-6);
132148
}
133149

150+
&.quaternary {
151+
@include button-style(inherit, $blue-2, $gray-7, $gray-7);
152+
}
153+
134154
&.destructive {
135155
@include button-style(inherit, inherit, $red-5, $red-7);
136156
}

projects/components/src/button/button.component.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ describe('Button Component', () => {
5151
});
5252
expect(spectator.query('.button')).toHaveClass('button tertiary small solid');
5353

54+
// Quaternary
55+
spectator.setInput({
56+
role: ButtonRole.Quaternary
57+
});
58+
expect(spectator.query('.button')).toHaveClass('button quaternary small solid');
59+
5460
// Destructive
5561
spectator.setInput({
5662
role: ButtonRole.Destructive

projects/components/src/button/button.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export const enum ButtonRole {
33
Primary = 'primary',
44
Secondary = 'secondary',
55
Tertiary = 'tertiary',
6+
Quaternary = 'quaternary',
67
Destructive = 'destructive',
78
Additive = 'additive'
89
}

0 commit comments

Comments
 (0)