fix(textarea): add and document custom properties

This commit is contained in:
Cam Wiegert
2018-08-08 15:34:53 -05:00
parent 5627811ef0
commit 5dfcd47b34
3 changed files with 45 additions and 1 deletions

View File

@ -4,6 +4,20 @@
// --------------------------------------------------
:host {
/**
* @prop --background: Background of the textarea
* @prop --border-radius: Border radius of the textarea
* @prop --color: Color of the text
* @prop --placeholder-color: Color of the placeholder text
* @prop --placeholder-weight: Weight of the placeholder text
* @prop --placeholder-opacity: Opacity of the placeholder text
* @prop --padding-top: Top padding of the textarea
* @prop --padding-end: End padding of the textarea
* @prop --padding-bottom: Bottom padding of the textarea
* @prop --padding-start: Start padding of the textarea
*/
--background: initial;
--color: currentColor;
--placeholder-color: currentColor;
--placeholder-weight: inherit;
--placeholder-opacity: .5;
@ -20,10 +34,16 @@
width: 100%;
box-sizing: border-box;
background: var(--background);
}
:host(.ion-color) {
color: #{current-color(base)};
background: initial;
}
:host(.ion-color) .native-textarea {
color: current-color(base);
}
// Textarea Within An Item
@ -53,6 +73,7 @@
outline: none;
background: transparent;
color: var(--color);
box-sizing: border-box;
resize: none;