mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Clarify the purpose of the color attribute
It's not clear that the `color` attribute is meant to be used only with the predefined colors _(i.e. the ones from the `$colors` list in `app.variables.scss`)_. The users expect that the attribute can also be used with color values like `red` or `#FF0000` which is not supported. More details are available in [this forum post](https://forum.ionicframework.com/t/changing-button-color-or-icon-dynamically/37675/19).
This commit is contained in:
@@ -27,7 +27,7 @@ import {isTrueProperty} from '../../util/util';
|
||||
* @property [fab-center] - Position a fab button towards the center.
|
||||
* @property [fab-top] - Position a fab button towards the top.
|
||||
* @property [fab-bottom] - Position a fab button towards the bottom.
|
||||
* @property [color] - Dynamically set which color attribute this button should use.
|
||||
* @property [color] - Dynamically set which predefined color this button should use (e.g. default, secondary, danger, etc).
|
||||
*
|
||||
* @demo /docs/v2/demos/button/
|
||||
* @see {@link /docs/v2/components#buttons Button Component Docs}
|
||||
@@ -142,7 +142,7 @@ export class Button {
|
||||
}
|
||||
|
||||
/**
|
||||
* @input {string} Dynamically set which color attribute this button should use.
|
||||
* @input {string} Dynamically set which predefined color this button should use (e.g. default, secondary, danger, etc).
|
||||
*/
|
||||
@Input()
|
||||
set color(val: string) {
|
||||
|
||||
Reference in New Issue
Block a user