Skip to content

Commit

Permalink
fix(button): correctly check default emphasis
Browse files Browse the repository at this point in the history
  • Loading branch information
matmkian committed Sep 20, 2019
1 parent f5c9fa5 commit a8b2dd3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/button/js/button_directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ function ButtonDirective() {
}
}

const isDefaultEmphasis = !attrs.lxEmphasis || attrs.lxEmphasis === 'high';
const isDefaultEmphasis =
(!attrs.lxType && !attrs.lxEmphasis) ||
attrs.lxEmphasis === 'high' ||
attrs.lxType === 'raised' ||
attrs.lxType === 'fab';

const defaultProps = {
color: isDefaultEmphasis ? 'primary' : 'dark',
Expand Down

0 comments on commit a8b2dd3

Please sign in to comment.