From 9788974d4c08290bbe91dcb0c355d800521f891f Mon Sep 17 00:00:00 2001 From: Josh Thomas Date: Tue, 2 May 2017 16:08:02 -0500 Subject: [PATCH] fix(button): corrected issue with colors required for styles. --- src/components/button/button.ts | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/components/button/button.ts b/src/components/button/button.ts index 5b3d17d5ba..39a5bbc6b6 100644 --- a/src/components/button/button.ts +++ b/src/components/button/button.ts @@ -182,10 +182,7 @@ export class Button { /** * @hidden */ - getColorClassList(color: string, role: string, style: string, mode: string): string | null { - if (!color) { - return null; - } + getColorClassList(color: string, role: string, style: string, mode: string): string[] { style = (role !== 'bar-button' && style === 'solid') ? 'default' : style; let className = role + @@ -193,16 +190,13 @@ export class Button { '-' + style.toLowerCase() : ''); - console.log(role, style, className, mode, color); - - return `${className}-${mode}-${color}`; + return [].concat( + `${className}-${mode}`, + color ? `${className}-${mode}-${color}` : [] + ); } getStyleClassList(role: string): string[] { - if (!this.color) { - return []; - } - var classList = [].concat( this.outline ? this.getColorClassList(this.color, role, 'outline', this.mode) : [], this.clear ? this.getColorClassList(this.color, role, 'clear', this.mode) : [],