From ac07c6f1244f657496a95945f40a152a1232d960 Mon Sep 17 00:00:00 2001 From: "Manu Mtz.-Almeida" Date: Tue, 6 Dec 2016 22:37:23 +0100 Subject: [PATCH] fix(button): button strong is configurable --- src/components/button/button.ios.scss | 10 ++++++++-- src/components/button/button.md.scss | 15 +++++++++++++++ src/components/button/button.wp.scss | 15 +++++++++++++++ src/components/picker/picker-component.ts | 3 --- src/components/picker/picker.ios.scss | 4 ++++ src/components/toolbar/toolbar.ios.scss | 2 +- src/components/toolbar/toolbar.md.scss | 8 ++++++++ src/components/toolbar/toolbar.wp.scss | 8 ++++++++ 8 files changed, 59 insertions(+), 6 deletions(-) diff --git a/src/components/button/button.ios.scss b/src/components/button/button.ios.scss index 331f1d4d88..5b07c8923b 100644 --- a/src/components/button/button.ios.scss +++ b/src/components/button/button.ios.scss @@ -119,7 +119,6 @@ $button-ios-clear-opacity-hover: .6 !default; // iOS Round Button // -------------------------------------------------- - /// @prop - Padding of the round button $button-ios-round-padding: $button-round-padding !default; @@ -127,6 +126,13 @@ $button-ios-round-padding: $button-round-padding !defau $button-ios-round-border-radius: $button-round-border-radius !default; +// iOS Decorator Button +// -------------------------------------------------- + +/// @prop - Font weight of the strong button +$button-ios-strong-font-weight: 600 !default; + + // iOS Default Button // -------------------------------------------------- @@ -318,5 +324,5 @@ $button-ios-round-border-radius: $button-round-border-radius // -------------------------------------------------- .button-strong-ios { - font-weight: 600; + font-weight: $button-ios-strong-font-weight; } diff --git a/src/components/button/button.md.scss b/src/components/button/button.md.scss index 1f029727a7..e7a6f46801 100644 --- a/src/components/button/button.md.scss +++ b/src/components/button/button.md.scss @@ -162,6 +162,13 @@ $button-md-round-padding: $button-round-padding !default; $button-md-round-border-radius: $button-round-border-radius !default; +// Material Design Decorator Button +// -------------------------------------------------- + +/// @prop - Font weight of the strong button +$button-md-strong-font-weight: bold !default; + + // Material Design Default Button // -------------------------------------------------- @@ -424,3 +431,11 @@ $button-md-round-border-radius: $button-round-border-radius !def @include md-button-outline($color-name, $color-base, $color-contrast); @include md-button-clear($color-name, $color-base, $color-contrast); } + + +// MD strong Button +// -------------------------------------------------- + +.button-strong-md { + font-weight: $button-md-strong-font-weight; +} diff --git a/src/components/button/button.wp.scss b/src/components/button/button.wp.scss index 2babcb5487..5d6892bf0b 100644 --- a/src/components/button/button.wp.scss +++ b/src/components/button/button.wp.scss @@ -117,6 +117,13 @@ $button-wp-round-padding: $button-round-padding $button-wp-round-border-radius: $button-round-border-radius !default; +// Material Design Decorator Button +// -------------------------------------------------- + +/// @prop - Font weight of the strong button +$button-wp-strong-font-weight: bold !default; + + // Windows Default Button // -------------------------------------------------- @@ -315,3 +322,11 @@ $button-wp-round-border-radius: $button-round-border-r @include wp-button-outline($color-name, $color-base, $color-contrast); @include wp-button-clear($color-name, $color-base, $color-contrast); } + + +// WP strong Button +// -------------------------------------------------- + +.button-strong-wp { + font-weight: $button-wp-strong-font-weight; +} diff --git a/src/components/picker/picker-component.ts b/src/components/picker/picker-component.ts index 0710297001..79d050aad9 100644 --- a/src/components/picker/picker-component.ts +++ b/src/components/picker/picker-component.ts @@ -500,9 +500,6 @@ export class PickerCmp { } return button; }); - if (data.buttons.length > 0) { - data.buttons[data.buttons.length - 1].strong = true; - } // clean up dat data data.columns = data.columns.map(column => { diff --git a/src/components/picker/picker.ios.scss b/src/components/picker/picker.ios.scss index bbc00827f7..1272cdbddc 100644 --- a/src/components/picker/picker.ios.scss +++ b/src/components/picker/picker.ios.scss @@ -73,6 +73,10 @@ $picker-ios-option-offset-y: (($picker-ios-height - $picker-io text-align: right; } +.picker-ios .picker-toolbar-button:last-child .picker-button { + font-weight: $button-ios-strong-font-weight; +} + .picker-ios .picker-toolbar-cancel { font-weight: normal; diff --git a/src/components/toolbar/toolbar.ios.scss b/src/components/toolbar/toolbar.ios.scss index 765cdecc04..edd29e015f 100644 --- a/src/components/toolbar/toolbar.ios.scss +++ b/src/components/toolbar/toolbar.ios.scss @@ -378,5 +378,5 @@ $navbar-ios-height: $toolbar-ios-height !default; // -------------------------------------------------- .bar-button-strong-ios { - font-weight: 600; + font-weight: $button-ios-strong-font-weight; } diff --git a/src/components/toolbar/toolbar.md.scss b/src/components/toolbar/toolbar.md.scss index 33b6ce7f85..db0f8afe2d 100644 --- a/src/components/toolbar/toolbar.md.scss +++ b/src/components/toolbar/toolbar.md.scss @@ -390,3 +390,11 @@ $navbar-md-height: $toolbar-md-height !default; @include md-bar-button-outline($color-name, $color-base, $color-contrast); @include md-bar-button-solid($color-name, $color-base, $color-contrast); } + + +// MD strong Button +// -------------------------------------------------- + +.bar-button-strong-md { + font-weight: $button-md-strong-font-weight; +} diff --git a/src/components/toolbar/toolbar.wp.scss b/src/components/toolbar/toolbar.wp.scss index 86c9538181..5fa35c45cc 100644 --- a/src/components/toolbar/toolbar.wp.scss +++ b/src/components/toolbar/toolbar.wp.scss @@ -344,3 +344,11 @@ $navbar-wp-height: $toolbar-wp-height !default; @include wp-bar-button-outline($color-name, $color-base, $color-contrast); @include wp-bar-button-solid($color-name, $color-base, $color-contrast); } + + +// WP strong Button +// -------------------------------------------------- + +.bar-button-strong-wp { + font-weight: $button-wp-strong-font-weight; +}