Skip to content

Commit

Permalink
fix(button): Patch for IE 11 helpkit-ember buttons (#134)
Browse files Browse the repository at this point in the history
* Urgent changes to button css

* urgent patch

* refactoring

* Following BEM conventions

* SCSS conventions

* new ref image

* refactoring ii
  • Loading branch information
sharath-sriram authored Feb 25, 2020
1 parent 50b9644 commit 0d7be8a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/button/addon/components/nucleus-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class NucleusButton extends Component {
@computed('iconSize', 'size')
get _iconSize() {
let iconSize = this.get('iconSize');
let defaultSize = this.get('size') ? this.get('size') : 'small';
let defaultSize = this.get('size') ? this.get('size') : 'medium';
return iconSize ? iconSize : defaultSize;
}

Expand Down
10 changes: 9 additions & 1 deletion packages/button/addon/styles/components/_nucleus-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ $active-box-shadow: inset 0 0 4px 0 rgba(0, 0, 0, .25);

.nucleus-button {
font-size: $font-size-14;
line-height: 1;
line-height: 1.2;
padding: 6px 12px;
border: 1px solid transparent;
border-radius: 4px;
Expand All @@ -37,6 +37,13 @@ $active-box-shadow: inset 0 0 4px 0 rgba(0, 0, 0, .25);
height: 32px;
min-width: 80px;

&__icon {
&.nucleus--active {
position: relative;
top: .125em;
}
}

&:focus {
border: 1px solid $color-azure-800;
box-shadow: 0 0 0 1px $color-azure-800;
Expand Down Expand Up @@ -135,6 +142,7 @@ $active-box-shadow: inset 0 0 4px 0 rgba(0, 0, 0, .25);
padding: 2px 2px;
font-size: $font-size-10;
min-width: 16px;
line-height: 1;
height: 16px;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{{#if icon}}{{nucleus-icon name=icon size=_iconSize variant=_iconVariant}}{{/if}}
{{#if icon}}
<span class="nucleus-button__icon {{unless iconOnly "nucleus--active"}}">
{{nucleus-icon name=icon size=_iconSize}}
</span>
{{/if}}
{{#if (and _isLoading _isShowLoading)}}
<div data-test-button-loader class="circle-loader {{if _isLoadingComplete "load-complete"}}">
<div class="checkmark draw"></div>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0d7be8a

Please sign in to comment.