fix(inputs): disabled handling (#16071)

This commit is contained in:
Manu MA
2018-10-25 22:50:06 +02:00
committed by GitHub
parent 4d3ad67740
commit ef6895acbd
36 changed files with 320 additions and 231 deletions

View File

@ -21,7 +21,7 @@
:host(.label-stacked) {
@include margin(null, null, 4px, null);
font-size: 12px;
font-size: 13.6px;
}
:host(.label-floating) {

View File

@ -19,7 +19,7 @@
// --------------------------------------------------
:host(.label-stacked) {
font-size: 12px;
font-size: 12.8px;
}
:host(.label-floating) {

View File

@ -29,7 +29,6 @@ export class Label implements ComponentInterface {
/**
* The position determines where and how the label behaves inside an item.
* Possible values are: 'inline' | 'fixed' | 'stacked' | 'floating'
*/
@Prop() position?: 'fixed' | 'stacked' | 'floating';
@ -42,11 +41,10 @@ export class Label implements ComponentInterface {
componentWillLoad() {
this.noAnimate = (this.position === 'floating');
this.emitStyle();
}
componentDidLoad() {
this.positionChanged();
if (this.noAnimate) {
setTimeout(() => {
this.noAnimate = false;
@ -56,6 +54,10 @@ export class Label implements ComponentInterface {
@Watch('position')
positionChanged() {
this.emitStyle();
}
private emitStyle() {
const position = this.position;
this.ionStyle.emit({
'label': true,

View File

@ -12,7 +12,7 @@ Label is a wrapper element that can be used in combination with `ion-item`, `ion
| ---------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| `color` | `color` | 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). | `string \| undefined` |
| `mode` | `mode` | The mode determines which platform styles to use. Possible values are: `"ios"` or `"md"`. | `"ios" \| "md"` |
| `position` | `position` | The position determines where and how the label behaves inside an item. Possible values are: 'inline' \| 'fixed' \| 'stacked' \| 'floating' | `"fixed" \| "floating" \| "stacked" \| undefined` |
| `position` | `position` | The position determines where and how the label behaves inside an item. | `"fixed" \| "floating" \| "stacked" \| undefined` |
## Events