mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
fix(segment-button): make layout optional
This commit is contained in:
4
core/src/components.d.ts
vendored
4
core/src/components.d.ts
vendored
@ -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.
|
||||
*/
|
||||
|
@ -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
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user