From e9e33add557f46d82f6654a3145409ae4c06f475 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Thu, 15 Nov 2018 12:33:42 -0500 Subject: [PATCH] fix(segment-button): make layout optional --- core/src/components.d.ts | 4 ++-- core/src/components/segment-button/segment-button.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/components.d.ts b/core/src/components.d.ts index 4ccf73646f..2c1fe952ae 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -3848,7 +3848,7 @@ export namespace Components { /** * Set the layout of the text and icon in the segment. */ - 'layout': SegmentButtonLayout; + 'layout'?: SegmentButtonLayout; /** * The mode determines which platform styles to use. */ @@ -3874,7 +3874,7 @@ export namespace Components { /** * Set the layout of the text and icon in the segment. */ - 'layout': SegmentButtonLayout; + 'layout'?: SegmentButtonLayout; /** * The mode determines which platform styles to use. */ diff --git a/core/src/components/segment-button/segment-button.tsx b/core/src/components/segment-button/segment-button.tsx index dcbed44eff..0d0327180e 100644 --- a/core/src/components/segment-button/segment-button.tsx +++ b/core/src/components/segment-button/segment-button.tsx @@ -42,7 +42,7 @@ export class SegmentButton implements ComponentInterface { /** * Set the layout of the text and icon in the segment. */ - @Prop() layout!: SegmentButtonLayout; + @Prop() layout?: SegmentButtonLayout; /** * The value of the segment button. @@ -73,7 +73,7 @@ export class SegmentButton implements ComponentInterface { ...createColorClasses(color), 'segment-button-disabled': disabled, 'segment-button-checked': checked, - [`segment-button-layout-${this.layout}`]: true + [`segment-button-layout-${this.layout}`]: !!this.layout } }; }