Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/components/textarea/Textarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ const Textarea = forwardRef<TextareaRefInterface, TextareaProps>((originalProps,
const textTips = tips && (
<div
className={classNames(`${classPrefix}-textarea__tips`, {
[`${classPrefix}-textarea__tips--normal`]: !status,
[`${classPrefix}-textarea__tips--${status}`]: status,
})}
>
Expand Down
1 change: 1 addition & 0 deletions packages/components/textarea/defaultProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ export const textareaDefaultProps: TdTextareaProps = {
disabled: false,
placeholder: undefined,
readonly: false,
status: 'default',
};
2 changes: 1 addition & 1 deletion packages/components/textarea/textarea.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ maxlength | Number | - | Typescript: `number` | N
name | String | - | \- | N
placeholder | String | undefined | \- | N
readonly | Boolean | false | \- | N
status | String | - | options: default/success/warning/error | N
status | String | default | optionsdefault/success/warning/error | N
tips | TNode | - | Typescript: `string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
value | String | - | Typescript: `TextareaValue` `type TextareaValue = string`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/textarea/type.ts) | N
defaultValue | String | - | uncontrolled property。Typescript: `TextareaValue` `type TextareaValue = string`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/textarea/type.ts) | N
Expand Down
2 changes: 1 addition & 1 deletion packages/components/textarea/textarea.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ maxlength | Number | - | 用户最多可以输入的字符个数 | N
name | String | - | 名称,HTML 元素原生属性 | N
placeholder | String | undefined | 占位符 | N
readonly | Boolean | false | 只读状态 | N
status | String | - | 文本框状态。可选项:default/success/warning/error | N
status | String | default | 文本框状态。可选项:default/success/warning/error | N
tips | TNode | - | 输入框下方提示文本,会根据不同的 `status` 呈现不同的样式。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
value | String | - | 文本框值。TS 类型:`TextareaValue` `type TextareaValue = string`。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/textarea/type.ts) | N
defaultValue | String | - | 文本框值。非受控属性。TS 类型:`TextareaValue` `type TextareaValue = string`。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/textarea/type.ts) | N
Expand Down
1 change: 1 addition & 0 deletions packages/components/textarea/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export interface TdTextareaProps {
readonly?: boolean;
/**
* 文本框状态
* @default default
*/
status?: 'default' | 'success' | 'warning' | 'error';
/**
Expand Down
48 changes: 24 additions & 24 deletions test/snap/__snapshots__/csr.test.jsx.snap

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions test/snap/__snapshots__/ssr.test.jsx.snap

Large diffs are not rendered by default.

Loading