chore(packages): move the packages to root

This commit is contained in:
Brandy Carney
2018-03-12 16:02:25 -04:00
parent 097f1a2cd3
commit d37623a2ca
1255 changed files with 38 additions and 38 deletions

View File

@ -0,0 +1,76 @@
import { Component, Element, Event, EventEmitter, Method, Prop } from '@stencil/core';
@Component({
tag: 'ion-label',
styleUrls: {
ios: 'label.ios.scss',
md: 'label.md.scss'
},
host: {
theme: 'label'
}
})
export class Label {
styleTmr: any;
@Element() private el: HTMLElement;
/**
* Emitted when the styles change.
*/
@Event() ionStyle: EventEmitter;
/**
* 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).
*/
@Prop() color: string;
/**
* 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';
/**
* If true, the label will sit alongside an input. Defaults to `false`.
*/
@Prop() fixed = false;
/**
* If true, the label will float above an input when the value is empty or the input is focused. Defaults to `false`.
*/
@Prop() floating = false;
/**
* If true, the label will be stacked above an input. Defaults to `false`.
*/
@Prop() stacked = false;
@Method()
getText(): string {
return this.el.textContent || '';
}
componentDidLoad() {
this.emitStyle();
}
emitStyle() {
clearTimeout(this.styleTmr);
const styles = {
'label-fixed': this.fixed,
'label-floating': this.floating,
'label-stacked': this.stacked
};
this.styleTmr = setTimeout(() => {
this.ionStyle.emit(styles);
});
}
}