mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 03:00:58 +08:00
docs(): update examples and usage
This commit is contained in:
@ -1,7 +1,14 @@
|
||||
import { Component, Element, Event, EventEmitter, Method, Prop, Watch } from '@stencil/core';
|
||||
import {
|
||||
Component,
|
||||
Element,
|
||||
Event,
|
||||
EventEmitter,
|
||||
Method,
|
||||
Prop,
|
||||
Watch
|
||||
} from '@stencil/core';
|
||||
import { Color, Mode, StyleEvent } from '../../interface';
|
||||
|
||||
|
||||
@Component({
|
||||
tag: 'ion-label',
|
||||
styleUrls: {
|
||||
@ -13,20 +20,16 @@ import { Color, Mode, StyleEvent } from '../../interface';
|
||||
}
|
||||
})
|
||||
export class Label {
|
||||
|
||||
@Element() el!: HTMLElement;
|
||||
|
||||
/**
|
||||
* The color to use from your Sass `$colors` map.
|
||||
* Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`.
|
||||
* For more information, see [Theming your App](/docs/theming/theming-your-app).
|
||||
* The color to use for the label's text
|
||||
*/
|
||||
@Prop() color?: Color;
|
||||
|
||||
/**
|
||||
* 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!: Mode;
|
||||
|
||||
@ -54,7 +57,7 @@ export class Label {
|
||||
positionChanged() {
|
||||
const position = this.position;
|
||||
return this.ionStyle.emit({
|
||||
[`label-${position}`]: !!position,
|
||||
[`label-${position}`]: !!position
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user