mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 02:41:05 +00:00
chore: v11 TextArea
`cols` no longer has a defaults to 50 but remains at 100% width by default.
This commit is contained in:
parent
b279d14292
commit
2ca2833945
4 changed files with 8 additions and 5 deletions
|
@ -4048,7 +4048,7 @@ None.
|
||||||
| ref | No | <code>let</code> | Yes | <code>null | HTMLTextAreaElement</code> | <code>null</code> | Obtain a reference to the textarea HTML element |
|
| ref | No | <code>let</code> | Yes | <code>null | HTMLTextAreaElement</code> | <code>null</code> | Obtain a reference to the textarea HTML element |
|
||||||
| value | No | <code>let</code> | Yes | <code>string</code> | <code>""</code> | Specify the textarea value |
|
| value | No | <code>let</code> | Yes | <code>string</code> | <code>""</code> | Specify the textarea value |
|
||||||
| placeholder | No | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the placeholder text |
|
| placeholder | No | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the placeholder text |
|
||||||
| cols | No | <code>let</code> | No | <code>number</code> | <code>50</code> | Specify the number of cols |
|
| cols | No | <code>let</code> | No | <code>number</code> | <code>undefined</code> | Specify the number of cols |
|
||||||
| rows | No | <code>let</code> | No | <code>number</code> | <code>4</code> | Specify the number of rows |
|
| rows | No | <code>let</code> | No | <code>number</code> | <code>4</code> | Specify the number of rows |
|
||||||
| maxCount | No | <code>let</code> | No | <code>number</code> | <code>undefined</code> | Specify the max character count |
|
| maxCount | No | <code>let</code> | No | <code>number</code> | <code>undefined</code> | Specify the max character count |
|
||||||
| light | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to enable the light variant |
|
| light | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to enable the light variant |
|
||||||
|
|
|
@ -12454,7 +12454,6 @@
|
||||||
"kind": "let",
|
"kind": "let",
|
||||||
"description": "Specify the number of cols",
|
"description": "Specify the number of cols",
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"value": "50",
|
|
||||||
"isFunction": false,
|
"isFunction": false,
|
||||||
"isFunctionDeclaration": false,
|
"isFunctionDeclaration": false,
|
||||||
"isRequired": false,
|
"isRequired": false,
|
||||||
|
|
|
@ -5,8 +5,11 @@
|
||||||
/** Specify the placeholder text */
|
/** Specify the placeholder text */
|
||||||
export let placeholder = "";
|
export let placeholder = "";
|
||||||
|
|
||||||
/** Specify the number of cols */
|
/**
|
||||||
export let cols = 50;
|
* Specify the number of cols
|
||||||
|
* @type {number}
|
||||||
|
* */
|
||||||
|
export let cols = undefined;
|
||||||
|
|
||||||
/** Specify the number of rows */
|
/** Specify the number of rows */
|
||||||
export let rows = 4;
|
export let rows = 4;
|
||||||
|
@ -110,6 +113,7 @@
|
||||||
class:bx--text-area--light="{light}"
|
class:bx--text-area--light="{light}"
|
||||||
class:bx--text-area--invalid="{invalid}"
|
class:bx--text-area--invalid="{invalid}"
|
||||||
maxlength="{maxCount ?? undefined}"
|
maxlength="{maxCount ?? undefined}"
|
||||||
|
style="{cols ? '' : 'width: 100%;'}"
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
on:change
|
on:change
|
||||||
on:input
|
on:input
|
||||||
|
|
2
types/TextArea/TextArea.svelte.d.ts
vendored
2
types/TextArea/TextArea.svelte.d.ts
vendored
|
@ -18,7 +18,7 @@ export interface TextAreaProps extends RestProps {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specify the number of cols
|
* Specify the number of cols
|
||||||
* @default 50
|
* @default undefined
|
||||||
*/
|
*/
|
||||||
cols?: number;
|
cols?: number;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue