Skip to content

Commit 98029d2

Browse files
palbizuPatricio Albizu
andauthored
Adding new style button (#963)
* feat: add new style Plain-text * feat: add new style Plain-text * feat: add pending uts * feat: fixing uts * feat: roll back flipping * feat: roll back flipping * feat: roll back flipping Co-authored-by: Patricio Albizu <[email protected]>
1 parent 4e56e26 commit 98029d2

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@
117117
}
118118
}
119119

120-
.text {
120+
.text,
121+
.plain-text {
121122
&.primary {
122123
@include button-style(inherit, inherit, $blue-5, $blue-4);
123124
}
@@ -147,7 +148,7 @@
147148
height: 40px;
148149
border-radius: 8px;
149150

150-
&:not(.icon-only) {
151+
&:not(.icon-only, .plain-text) {
151152
padding: 0 20px;
152153
}
153154

@@ -161,7 +162,7 @@
161162
height: 36px;
162163
border-radius: 6px;
163164

164-
&:not(.icon-only) {
165+
&:not(.icon-only, .plain-text) {
165166
padding: 0 16px;
166167
}
167168

@@ -189,7 +190,7 @@
189190
height: 24px;
190191
border-radius: 4px;
191192

192-
&:not(.icon-only) {
193+
&:not(.icon-only, .plain-text) {
193194
padding: 0 12px;
194195
}
195196

@@ -203,7 +204,7 @@
203204
height: 18px;
204205
border-radius: 4px;
205206

206-
&:not(.icon-only) {
207+
&:not(.icon-only, .plain-text) {
207208
padding: 0 12px;
208209
}
209210

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,12 @@ describe('Button Component', () => {
146146
});
147147
expect(spectator.query('.button')).toHaveClass('button secondary small text');
148148

149+
// Text
150+
spectator.setInput({
151+
display: ButtonStyle.PlainText
152+
});
153+
expect(spectator.query('.button')).toHaveClass('button secondary small plain-text');
154+
149155
// Solid
150156
spectator.setInput({
151157
display: ButtonStyle.Solid

projects/components/src/button/button.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ export const enum ButtonSize {
1818

1919
export const enum ButtonStyle {
2020
// These values are used as css classes
21-
// Background Color | Background Hover Color | Text Hover Color | Border Color
22-
Solid = 'solid', // Yes Yes No No
23-
Outlined = 'outlined', // No Yes No No
24-
Bordered = 'bordered', // No Yes No Yes
25-
Text = 'text' // No No Yes No
21+
// Background Color | Background Hover Color | Text Hover Color | Border Color | Padding
22+
Solid = 'solid', // Yes Yes No No Yes
23+
Outlined = 'outlined', // No Yes No No Yes
24+
Bordered = 'bordered', // No Yes No Yes Yes
25+
Text = 'text', // No No Yes No Yes
26+
PlainText = 'plain-text' // No No Yes No No
2627
}

0 commit comments

Comments
 (0)