diff --git a/packages/core/src/components.d.ts b/packages/core/src/components.d.ts index 6c53e58032..b78594d3da 100644 --- a/packages/core/src/components.d.ts +++ b/packages/core/src/components.d.ts @@ -2425,6 +2425,7 @@ declare global { } namespace JSXElements { export interface IonSegmentButtonAttributes extends HTMLAttributes { + activated?: boolean; checked?: boolean; color?: string; disabled?: boolean; diff --git a/packages/core/src/components/segment-button/readme.md b/packages/core/src/components/segment-button/readme.md index a1a28d6c1f..81d7a08cde 100644 --- a/packages/core/src/components/segment-button/readme.md +++ b/packages/core/src/components/segment-button/readme.md @@ -31,15 +31,25 @@ The child buttons of the `ion-segment` component. Each `ion-segment-button` must ## Properties +#### activated + +boolean + + #### checked boolean +If true, the segment button is selected. Defaults to `false`. + #### color string +The color to use for the text color. +Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`. + #### disabled @@ -50,23 +60,38 @@ boolean any +The mode determines which platform styles to use. +Possible values are: `"ios"` or `"md"`. + #### value string +The value of the segment button. + ## Attributes +#### activated + +boolean + + #### checked boolean +If true, the segment button is selected. Defaults to `false`. + #### color string +The color to use for the text color. +Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`. + #### disabled @@ -77,16 +102,23 @@ boolean any +The mode determines which platform styles to use. +Possible values are: `"ios"` or `"md"`. + #### value string +The value of the segment button. + ## Events #### ionClick +Emitted when the segment button is clicked. + ---------------------------------------------- diff --git a/packages/core/src/components/segment-button/segment-button.tsx b/packages/core/src/components/segment-button/segment-button.tsx index 72788f3c1b..33db49a37d 100644 --- a/packages/core/src/components/segment-button/segment-button.tsx +++ b/packages/core/src/components/segment-button/segment-button.tsx @@ -12,38 +12,36 @@ export class SegmentButton { @Element() private el: HTMLElement; /** - * @output {SegmentButtonEvent} Emitted when the segment button is clicked. + * Emitted when the segment button is clicked. */ @Event() ionClick: EventEmitter; - @State() activated: boolean = false; + @Prop({mutable: true}) activated: boolean = false; /** - * @input {string} The color to use from your Sass `$colors` map. + * The color to use for the text color. * Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`. - * For more information, see [Theming your App](/docs/theming/theming-your-app). */ @Prop() color: string; /** - * @input {string} The mode determines which platform styles to use. + * The mode determines which platform styles to use. * Possible values are: `"ios"` or `"md"`. - * For more information, see [Platform Styles](/docs/theming/platform-specific-styles). */ @Prop() mode: 'ios' | 'md'; /** - * @input {boolean} If true, the segment button is selected. Defaults to `false`. + * If true, the segment button is selected. Defaults to `false`. */ @Prop({ mutable: true }) checked: boolean = false; /* - * @input {boolean} If true, the user cannot interact with the segment button. Default false. + * If true, the user cannot interact with the segment button. Default false. */ @Prop({ mutable: true }) disabled: boolean = false; /** - * @input {string} the value of the segment button. + * The value of the segment button. */ @Prop({ mutable: true }) value: string; diff --git a/packages/core/src/components/segment/readme.md b/packages/core/src/components/segment/readme.md index 122613ef99..e8a1f14e06 100644 --- a/packages/core/src/components/segment/readme.md +++ b/packages/core/src/components/segment/readme.md @@ -58,6 +58,9 @@ Segments provide functionality similar to tabs, selecting one will unselect all string +The color to use for the text color. +Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`. + #### disabled @@ -68,11 +71,16 @@ boolean any +The mode determines which platform styles to use. +Possible values are: `"ios"` or `"md"`. + #### value string +the value of the segment. + ## Attributes @@ -80,6 +88,9 @@ string string +The color to use for the text color. +Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`. + #### disabled @@ -90,16 +101,23 @@ boolean any +The mode determines which platform styles to use. +Possible values are: `"ios"` or `"md"`. + #### value string +the value of the segment. + ## Events #### ionChange +Emitted when the value property has changed. + ---------------------------------------------- diff --git a/packages/core/src/components/segment/segment.tsx b/packages/core/src/components/segment/segment.tsx index 904e29cb56..09397cc545 100644 --- a/packages/core/src/components/segment/segment.tsx +++ b/packages/core/src/components/segment/segment.tsx @@ -18,31 +18,29 @@ export class Segment { @Element() private el: HTMLElement; /** - * @output {Event} Emitted when the value property has changed. + * Emitted when the value property has changed. */ @Event() ionChange: EventEmitter; /** - * @input {string} The color to use from your Sass `$colors` map. + * The color to use for the text color. * Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`. - * For more information, see [Theming your App](/docs/theming/theming-your-app). */ @Prop() color: string; /** - * @input {string} The mode determines which platform styles to use. + * The mode determines which platform styles to use. * Possible values are: `"ios"` or `"md"`. - * For more information, see [Platform Styles](/docs/theming/platform-specific-styles). */ @Prop() mode: 'ios' | 'md'; /* - * @input {boolean} If true, the user cannot interact with the segment. Default false. + * If true, the user cannot interact with the segment. Default false. */ @Prop({ mutable: true }) disabled: boolean = false; /** - * @input {string} the value of the segment. + * the value of the segment. */ @Prop({ mutable: true }) value: string; @@ -53,7 +51,6 @@ export class Segment { componentDidLoad() { this.buttons = this.el.querySelectorAll('ion-segment-button'); - for (var i = 0; i < this.buttons.length; i++) { const button = this.buttons[i]; diff --git a/packages/core/src/components/segment/test/basic/index.html b/packages/core/src/components/segment/test/basic/index.html index 74a540581c..7088f5e008 100644 --- a/packages/core/src/components/segment/test/basic/index.html +++ b/packages/core/src/components/segment/test/basic/index.html @@ -49,10 +49,10 @@ - + - + @@ -119,6 +119,8 @@ console.log('event.target: ', event.target.value); }); } + + diff --git a/packages/demos/conference-app/angular/src/pages/about/about.html b/packages/demos/conference-app/angular/src/pages/about/about.html index 90069acb66..e3e9eba05f 100644 --- a/packages/demos/conference-app/angular/src/pages/about/about.html +++ b/packages/demos/conference-app/angular/src/pages/about/about.html @@ -1,13 +1,12 @@ - - + + About - @@ -53,4 +52,4 @@

-
\ No newline at end of file + diff --git a/packages/demos/conference-app/angular/src/pages/account/account.html b/packages/demos/conference-app/angular/src/pages/account/account.html index 1fa541a5e6..4759c22402 100644 --- a/packages/demos/conference-app/angular/src/pages/account/account.html +++ b/packages/demos/conference-app/angular/src/pages/account/account.html @@ -1,6 +1,6 @@ - + @@ -24,4 +24,4 @@ - \ No newline at end of file + diff --git a/packages/demos/conference-app/angular/src/pages/map/map.html b/packages/demos/conference-app/angular/src/pages/map/map.html index bc4eeebbc6..1ef5e0642a 100644 --- a/packages/demos/conference-app/angular/src/pages/map/map.html +++ b/packages/demos/conference-app/angular/src/pages/map/map.html @@ -1,6 +1,6 @@ - + @@ -13,4 +13,4 @@
-
\ No newline at end of file + diff --git a/packages/demos/conference-app/angular/src/pages/schedule/schedule.html b/packages/demos/conference-app/angular/src/pages/schedule/schedule.html index 278f2a1fc3..0183776f44 100644 --- a/packages/demos/conference-app/angular/src/pages/schedule/schedule.html +++ b/packages/demos/conference-app/angular/src/pages/schedule/schedule.html @@ -7,7 +7,7 @@ - + All diff --git a/packages/demos/conference-app/angular/src/pages/session-detail/session-detail.html b/packages/demos/conference-app/angular/src/pages/session-detail/session-detail.html index 92018f6ad0..432300a6d6 100644 --- a/packages/demos/conference-app/angular/src/pages/session-detail/session-detail.html +++ b/packages/demos/conference-app/angular/src/pages/session-detail/session-detail.html @@ -1,6 +1,6 @@ - + {{session.name}} @@ -18,4 +18,4 @@

{{session.description}}

-
\ No newline at end of file + diff --git a/packages/demos/conference-app/angular/src/pages/speaker-detail/speaker-detail.html b/packages/demos/conference-app/angular/src/pages/speaker-detail/speaker-detail.html index 8a80aaf3f3..094a14318a 100644 --- a/packages/demos/conference-app/angular/src/pages/speaker-detail/speaker-detail.html +++ b/packages/demos/conference-app/angular/src/pages/speaker-detail/speaker-detail.html @@ -1,6 +1,6 @@ - + {{speaker?.name}} @@ -22,4 +22,4 @@

{{speaker?.about}}

-
\ No newline at end of file + diff --git a/packages/demos/conference-app/angular/src/pages/speaker-list/speaker-list.html b/packages/demos/conference-app/angular/src/pages/speaker-list/speaker-list.html index 4cde4fa7cd..60e5fdf8c1 100644 --- a/packages/demos/conference-app/angular/src/pages/speaker-list/speaker-list.html +++ b/packages/demos/conference-app/angular/src/pages/speaker-list/speaker-list.html @@ -1,6 +1,6 @@ - + @@ -15,7 +15,7 @@ - + @@ -27,7 +27,7 @@ - +

{{session.name}}

@@ -39,21 +39,21 @@
- + - + Tweet - + Share - + Contact @@ -67,4 +67,4 @@
-
\ No newline at end of file + diff --git a/packages/demos/conference-app/angular/src/pages/speaker-list/speaker-list.scss b/packages/demos/conference-app/angular/src/pages/speaker-list/speaker-list.scss index 051ffe3bba..9e881f171a 100644 --- a/packages/demos/conference-app/angular/src/pages/speaker-list/speaker-list.scss +++ b/packages/demos/conference-app/angular/src/pages/speaker-list/speaker-list.scss @@ -1,6 +1,8 @@ page-speaker-list { - .scroll-content { - background: #EDEDED; + + .outer-content .content-md, + .outer-content .content-ios { + background-color: #ededed; } .speaker-card { @@ -13,12 +15,12 @@ page-speaker-list { } } - // Todo: remove when this issue https://github.com/ionic-team/ionic/issues/11212 is fixed - @media(min-width: 769px) { - .speaker-card { - height: 370px; - } - } + // // Todo: remove when this issue https://github.com/ionic-team/ionic/issues/11212 is fixed + // @media(min-width: 769px) { + // .speaker-card { + // height: 370px; + // } + // } .speaker-card ion-card-header .item { padding: 4px 16px; @@ -28,4 +30,4 @@ page-speaker-list { padding-left: 0; padding-right: 0; } -} + } diff --git a/packages/demos/conference-app/angular/src/pages/speaker-list/speaker-list.ts b/packages/demos/conference-app/angular/src/pages/speaker-list/speaker-list.ts index d6ba016c41..8709ae615e 100644 --- a/packages/demos/conference-app/angular/src/pages/speaker-list/speaker-list.ts +++ b/packages/demos/conference-app/angular/src/pages/speaker-list/speaker-list.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, ViewEncapsulation } from '@angular/core'; import { ActionSheetController, @@ -15,7 +15,9 @@ import { SpeakerDetailPage } from '../speaker-detail/speaker-detail'; @Component({ selector: 'page-speaker-list', - templateUrl: 'speaker-list.html' + templateUrl: 'speaker-list.html', + styleUrls: ['./speaker-list.scss'], + encapsulation: ViewEncapsulation.None }) export class SpeakerListPage { speakers: any[] = [];