mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-19 07:29:14 +00:00
Compare commits
5 Commits
hints
...
konnorroge
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0c30a4ab9e | ||
|
|
dd900a244f | ||
|
|
008e4549db | ||
|
|
84f203e8fd | ||
|
|
f6e9bcf9fd |
@@ -63,6 +63,14 @@ Use the `disabled` attribute to disable a textarea.
|
||||
<wa-textarea placeholder="Textarea" disabled></wa-textarea>
|
||||
```
|
||||
|
||||
### Value
|
||||
|
||||
Use the `value` attribute to set an initial value.
|
||||
|
||||
```html {.example}
|
||||
<wa-textarea value="Write something awesome!"></wa-textarea>
|
||||
```
|
||||
|
||||
### Sizes
|
||||
|
||||
Use the `size` attribute to change a textarea's size.
|
||||
@@ -89,4 +97,4 @@ Textareas will automatically resize to expand to fit their content when `resize`
|
||||
|
||||
```html {.example}
|
||||
<wa-textarea resize="auto"></wa-textarea>
|
||||
```
|
||||
```
|
||||
@@ -25,7 +25,7 @@ describe('<wa-textarea>', () => {
|
||||
expect(el.value).to.equal('');
|
||||
expect(el.defaultValue).to.equal('');
|
||||
expect(el.title).to.equal('');
|
||||
expect(el.filled).to.be.false;
|
||||
expect(el.appearance).to.equal('outlined');
|
||||
expect(el.label).to.equal('');
|
||||
expect(el.hint).to.equal('');
|
||||
expect(el.placeholder).to.equal('');
|
||||
|
||||
@@ -208,6 +208,7 @@ export default class WaTextarea extends WebAwesomeFormAssociatedElement {
|
||||
}
|
||||
|
||||
private handleChange() {
|
||||
this.valueHasChanged = true;
|
||||
this.value = this.input.value;
|
||||
this.setTextareaHeight();
|
||||
this.dispatchEvent(new WaChangeEvent());
|
||||
@@ -220,6 +221,7 @@ export default class WaTextarea extends WebAwesomeFormAssociatedElement {
|
||||
}
|
||||
|
||||
private handleInput() {
|
||||
this.valueHasChanged = true;
|
||||
this.value = this.input.value;
|
||||
this.dispatchEvent(new WaInputEvent());
|
||||
}
|
||||
|
||||
@@ -101,8 +101,9 @@
|
||||
--wa-color-neutral-on-loud: white;
|
||||
}
|
||||
|
||||
/** need to wrap :host-context() in an :is() selector for unsupported browsers */
|
||||
.wa-theme-default-dark,
|
||||
:host-context(.wa-theme-default-dark) {
|
||||
:is(:host-context(.wa-theme-default-dark)) {
|
||||
/**
|
||||
* Foundational Colors
|
||||
*/
|
||||
|
||||
@@ -48,8 +48,9 @@
|
||||
--wa-tooltip-line-height: var(--wa-line-height-normal);
|
||||
}
|
||||
|
||||
/** need to wrap :host-context() in an :is() selector for unsupported browsers */
|
||||
.wa-theme-default-dark,
|
||||
:host-context(.wa-theme-default-dark) {
|
||||
:is(:host-context(.wa-theme-default-dark)) {
|
||||
/* Form controls */
|
||||
--wa-form-control-background-color: var(--wa-color-surface-default);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user