Skip to content

Commit

Permalink
fix(button): button strong is configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Dec 6, 2016
1 parent c6fbb9c commit ac07c6f
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 6 deletions.
10 changes: 8 additions & 2 deletions src/components/button/button.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,20 @@ $button-ios-clear-opacity-hover: .6 !default;
// iOS Round Button
// --------------------------------------------------


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

/// @prop - Border radius of the round button
$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
// --------------------------------------------------

Expand Down Expand Up @@ -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;
}
15 changes: 15 additions & 0 deletions src/components/button/button.md.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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
// --------------------------------------------------

Expand Down Expand Up @@ -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;
}
15 changes: 15 additions & 0 deletions src/components/button/button.wp.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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
// --------------------------------------------------

Expand Down Expand Up @@ -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;
}
3 changes: 0 additions & 3 deletions src/components/picker/picker-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down
4 changes: 4 additions & 0 deletions src/components/picker/picker.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/components/toolbar/toolbar.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
8 changes: 8 additions & 0 deletions src/components/toolbar/toolbar.md.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
8 changes: 8 additions & 0 deletions src/components/toolbar/toolbar.wp.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit ac07c6f

Please sign in to comment.