fix(segment): set colors in the parent segment and remove the unused color property (#16590)

* style(theming): clean up sass TODOs

* fix(item): use proper padding on small buttons in an item

* refactor(components): remove color from unused components

* chore(components): update build files to remove color

* fix(tab-bar): remove unused layout prop

* test(segment): add custom test and update standalone

* docs(segment): update usage examples to remove layout

* test(segment): update tests to remove layout

* test(tab-bar): update tests to remove layout

* fix(segment): set the colors in the parent segment

but use them in the child segment button

This allows the user to customize all of the segment buttons from segment, while still allowing the `color` property to take precedence, and they can also edit the segment button colors directly if desired.

This actually fixes some bugs surrounding colors and allows customization for a segment inside of a toolbar.

references #14853

* style(sass): fix lint errors

* chore(build): build files

* fix(segment-button): use transparent background

* docs(segment-button): add color activated back

* why does the build hate me

* fix(segment): set initial css variables to avoid inheriting

* fix(segment): set initial color activated

also add new line to the nav readme because reasons

* test(segment): parent mode should match children
This commit is contained in:
Brandy Carney
2018-12-05 18:12:14 -05:00
committed by Manu MA
parent 68e26192a5
commit 8029df344a
36 changed files with 432 additions and 222 deletions

View File

@ -3847,10 +3847,6 @@ export namespace Components {
*/
'checked': boolean;
/**
* The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics).
*/
'color'?: Color;
/**
* If `true`, the user cannot interact with the segment button.
*/
'disabled': boolean;
@ -3873,10 +3869,6 @@ export namespace Components {
*/
'checked'?: boolean;
/**
* The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics).
*/
'color'?: Color;
/**
* If `true`, the user cannot interact with the segment button.
*/
'disabled'?: boolean;
@ -4389,10 +4381,6 @@ export namespace Components {
*/
'color'?: Color;
/**
* Set the layout of the text and icon in the tab bar.
*/
'layout': TabButtonLayout;
/**
* The mode determines which platform styles to use.
*/
'mode': Mode;
@ -4411,10 +4399,6 @@ export namespace Components {
*/
'color'?: Color;
/**
* Set the layout of the text and icon in the tab bar.
*/
'layout'?: TabButtonLayout;
/**
* The mode determines which platform styles to use.
*/
'mode'?: Mode;
@ -4430,10 +4414,6 @@ export namespace Components {
}
interface IonTabButton {
/**
* The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics).
*/
'color'?: Color;
/**
* The selected tab component
*/
@ -4456,10 +4436,6 @@ export namespace Components {
'tab': string;
}
interface IonTabButtonAttributes extends StencilHTMLAttributes {
/**
* The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics).
*/
'color'?: Color;
/**
* The selected tab component
*/