diff --git a/src/scripts/Button.js b/src/scripts/Button.js index 2f76b95f1..fc5b134d9 100644 --- a/src/scripts/Button.js +++ b/src/scripts/Button.js @@ -16,16 +16,31 @@ export default class Button extends Component { } renderIcon(iconSize, inv) { - const { icon, iconAlign, type } = this.props; + const { icon, iconAlign, type, iconStyle } = this.props; const inverse = inv || /\-?inverse$/.test(type); - return ; + return ( + + ); } renderIconMore() { - const { iconMore, icon, iconAlign, label, children } = this.props; + const { iconMore, icon, iconAlign, iconStyle, label, children } = this.props; const adjoining = icon && (iconAlign === 'right' || !(label || children)); const iconMoreSize = this.props.iconMoreSize || adjoining ? 'x-small' : 'small'; - return ; + return ( + + ); } render() { @@ -41,14 +56,11 @@ export default class Button extends Component { typeClassName, { 'slds-is-selected': selected, - [`slds-button--${size}`]: size && !/^icon-/.test(type), - [`slds-button--icon-${size}`]: /^(x-small|small)$/.test(size) && /^icon-/.test(type), + [`slds-button--${size}`]: size && !/^icon/.test(type), + [`slds-button--icon-${size}`]: /^(x-small|small)$/.test(size) && /^icon/.test(type), } ); - delete props.component; - delete props.items; - return (