fix(text-area): export readonly prop (#1043)

Fixes #1009
This commit is contained in:
metonym 2022-01-26 19:19:49 -08:00 committed by GitHub
commit 3018c2b207
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 1 deletions

View file

@ -17,6 +17,9 @@
/** Set to `true` to disable the input */
export let disabled = false;
/** Set to `true` to use the read-only variant */
export let readonly = false;
/** Specify the helper text */
export let helperText = "";
@ -87,11 +90,11 @@
rows="{rows}"
value="{value ?? ''}"
placeholder="{placeholder}"
readonly="{readonly}"
class:bx--text-area="{true}"
class:bx--text-area--light="{light}"
class:bx--text-area--invalid="{invalid}"
{...$$restProps}
readonly="{$$restProps.readonly === true ? true : undefined}"
on:change
on:input
on:input="{({ target }) => {