Files
ionic-framework/core/src/components/note/note.tsx
2018-09-14 18:47:00 +02:00

39 lines
925 B
TypeScript

import { Component, ComponentInterface, Prop } from '@stencil/core';
import { Color, Mode } from '../../interface';
import { createColorClasses } from '../../utils/theme';
@Component({
tag: 'ion-note',
styleUrls: {
ios: 'note.ios.scss',
md: 'note.md.scss'
},
shadow: true
})
export class Note implements ComponentInterface {
/**
* 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).
*/
@Prop() color?: Color;
/**
* The mode determines which platform styles to use.
* Possible values are: `"ios"` or `"md"`.
*/
@Prop() mode!: Mode;
hostData() {
return {
class: createColorClasses(this.color)
};
}
render() {
return <slot></slot>;
}
}