Skip to content

Commit

Permalink
fix(segment-button): make layout optional
Browse files Browse the repository at this point in the history
  • Loading branch information
brandyscarney committed Nov 15, 2018
1 parent 256745c commit e9e33ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions core/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand All @@ -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.
*/
Expand Down
4 changes: 2 additions & 2 deletions core/src/components/segment-button/segment-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
}
};
}
Expand Down

0 comments on commit e9e33ad

Please sign in to comment.