Skip to content

Commit ac07c6f

Browse files
committed
fix(button): button strong is configurable
1 parent c6fbb9c commit ac07c6f

File tree

8 files changed

+59
-6
lines changed

8 files changed

+59
-6
lines changed

src/components/button/button.ios.scss

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,20 @@ $button-ios-clear-opacity-hover: .6 !default;
119119
// iOS Round Button
120120
// --------------------------------------------------
121121

122-
123122
/// @prop - Padding of the round button
124123
$button-ios-round-padding: $button-round-padding !default;
125124

126125
/// @prop - Border radius of the round button
127126
$button-ios-round-border-radius: $button-round-border-radius !default;
128127

129128

129+
// iOS Decorator Button
130+
// --------------------------------------------------
131+
132+
/// @prop - Font weight of the strong button
133+
$button-ios-strong-font-weight: 600 !default;
134+
135+
130136
// iOS Default Button
131137
// --------------------------------------------------
132138

@@ -318,5 +324,5 @@ $button-ios-round-border-radius: $button-round-border-radius
318324
// --------------------------------------------------
319325

320326
.button-strong-ios {
321-
font-weight: 600;
327+
font-weight: $button-ios-strong-font-weight;
322328
}

src/components/button/button.md.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,13 @@ $button-md-round-padding: $button-round-padding !default;
162162
$button-md-round-border-radius: $button-round-border-radius !default;
163163

164164

165+
// Material Design Decorator Button
166+
// --------------------------------------------------
167+
168+
/// @prop - Font weight of the strong button
169+
$button-md-strong-font-weight: bold !default;
170+
171+
165172
// Material Design Default Button
166173
// --------------------------------------------------
167174

@@ -424,3 +431,11 @@ $button-md-round-border-radius: $button-round-border-radius !def
424431
@include md-button-outline($color-name, $color-base, $color-contrast);
425432
@include md-button-clear($color-name, $color-base, $color-contrast);
426433
}
434+
435+
436+
// MD strong Button
437+
// --------------------------------------------------
438+
439+
.button-strong-md {
440+
font-weight: $button-md-strong-font-weight;
441+
}

src/components/button/button.wp.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,13 @@ $button-wp-round-padding: $button-round-padding
117117
$button-wp-round-border-radius: $button-round-border-radius !default;
118118

119119

120+
// Material Design Decorator Button
121+
// --------------------------------------------------
122+
123+
/// @prop - Font weight of the strong button
124+
$button-wp-strong-font-weight: bold !default;
125+
126+
120127
// Windows Default Button
121128
// --------------------------------------------------
122129

@@ -315,3 +322,11 @@ $button-wp-round-border-radius: $button-round-border-r
315322
@include wp-button-outline($color-name, $color-base, $color-contrast);
316323
@include wp-button-clear($color-name, $color-base, $color-contrast);
317324
}
325+
326+
327+
// WP strong Button
328+
// --------------------------------------------------
329+
330+
.button-strong-wp {
331+
font-weight: $button-wp-strong-font-weight;
332+
}

src/components/picker/picker-component.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -500,9 +500,6 @@ export class PickerCmp {
500500
}
501501
return button;
502502
});
503-
if (data.buttons.length > 0) {
504-
data.buttons[data.buttons.length - 1].strong = true;
505-
}
506503

507504
// clean up dat data
508505
data.columns = data.columns.map(column => {

src/components/picker/picker.ios.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ $picker-ios-option-offset-y: (($picker-ios-height - $picker-io
7373
text-align: right;
7474
}
7575

76+
.picker-ios .picker-toolbar-button:last-child .picker-button {
77+
font-weight: $button-ios-strong-font-weight;
78+
}
79+
7680
.picker-ios .picker-toolbar-cancel {
7781
font-weight: normal;
7882

src/components/toolbar/toolbar.ios.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,5 +378,5 @@ $navbar-ios-height: $toolbar-ios-height !default;
378378
// --------------------------------------------------
379379

380380
.bar-button-strong-ios {
381-
font-weight: 600;
381+
font-weight: $button-ios-strong-font-weight;
382382
}

src/components/toolbar/toolbar.md.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,3 +390,11 @@ $navbar-md-height: $toolbar-md-height !default;
390390
@include md-bar-button-outline($color-name, $color-base, $color-contrast);
391391
@include md-bar-button-solid($color-name, $color-base, $color-contrast);
392392
}
393+
394+
395+
// MD strong Button
396+
// --------------------------------------------------
397+
398+
.bar-button-strong-md {
399+
font-weight: $button-md-strong-font-weight;
400+
}

src/components/toolbar/toolbar.wp.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,3 +344,11 @@ $navbar-wp-height: $toolbar-wp-height !default;
344344
@include wp-bar-button-outline($color-name, $color-base, $color-contrast);
345345
@include wp-bar-button-solid($color-name, $color-base, $color-contrast);
346346
}
347+
348+
349+
// WP strong Button
350+
// --------------------------------------------------
351+
352+
.bar-button-strong-wp {
353+
font-weight: $button-wp-strong-font-weight;
354+
}

0 commit comments

Comments
 (0)