fix(segment-button): make layout optional

This commit is contained in:
Brandy Carney
2018-11-15 12:33:42 -05:00
parent 256745cd1e
commit e9e33add55
2 changed files with 4 additions and 4 deletions

View File

@ -3848,7 +3848,7 @@ export namespace Components {
/** /**
* Set the layout of the text and icon in the segment. * Set the layout of the text and icon in the segment.
*/ */
'layout': SegmentButtonLayout; 'layout'?: SegmentButtonLayout;
/** /**
* The mode determines which platform styles to use. * 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. * Set the layout of the text and icon in the segment.
*/ */
'layout': SegmentButtonLayout; 'layout'?: SegmentButtonLayout;
/** /**
* The mode determines which platform styles to use. * The mode determines which platform styles to use.
*/ */

View File

@ -42,7 +42,7 @@ export class SegmentButton implements ComponentInterface {
/** /**
* Set the layout of the text and icon in the segment. * Set the layout of the text and icon in the segment.
*/ */
@Prop() layout!: SegmentButtonLayout; @Prop() layout?: SegmentButtonLayout;
/** /**
* The value of the segment button. * The value of the segment button.
@ -73,7 +73,7 @@ export class SegmentButton implements ComponentInterface {
...createColorClasses(color), ...createColorClasses(color),
'segment-button-disabled': disabled, 'segment-button-disabled': disabled,
'segment-button-checked': checked, 'segment-button-checked': checked,
[`segment-button-layout-${this.layout}`]: true [`segment-button-layout-${this.layout}`]: !!this.layout
} }
}; };
} }