Skip to content

Commit

Permalink
docs(input): fix status default value (#509)
Browse files Browse the repository at this point in the history
  • Loading branch information
liweijie0812 authored Sep 4, 2024
1 parent a0417ab commit a02e0fe
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/input/defaultProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ export const inputDefaultProps: TdInputProps = {
layout: 'horizontal',
placeholder: undefined,
readonly: undefined,
status: undefined,
status: 'default',
type: 'text',
};
2 changes: 1 addition & 1 deletion src/input/input.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ placeholder | String | undefined | \- | N
prefixIcon | TElement | - | Typescript:`TNode`[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
readonly | Boolean | undefined | \- | N
size | String | medium | `deprecated`。options: small/medium。Typescript:`'medium' \| 'small'` | N
status | String | undefined | options: default/success/warning/error | N
status | String | default | options: default/success/warning/error | N
suffix | TNode | - | suffix content before suffixIcon。Typescript:`string \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
suffixIcon | TElement | - | suffix icon of input。Typescript:`TNode`[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
tips | TNode | - | tips on the bottom of input, different `status` can make tips to be different color。Typescript:`string \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
Expand Down
2 changes: 1 addition & 1 deletion src/input/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ placeholder | String | undefined | 占位符 | N
prefixIcon | TElement | - | 组件前置图标。TS 类型:`TNode`[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
readonly | Boolean | undefined | 只读状态 | N
size | String | medium | 已废弃。输入框尺寸。可选项:small/medium。TS 类型:`'medium' \| 'small'` | N
status | String | undefined | 输入框状态。默认情况会由组件内部根据实际情况呈现,如果文本过长引起的状态变化。可选项:default/success/warning/error | N
status | String | default | 输入框状态。可选项:default/success/warning/error | N
suffix | TNode | - | 后置图标前的后置内容。TS 类型:`string \| TNode`[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
suffixIcon | TElement | - | 组件后置图标。TS 类型:`TNode`[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
tips | TNode | - | 输入框下方提示文本,会根据不同的 `status` 呈现不同的样式。TS 类型:`string \| TNode`[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
Expand Down
3 changes: 2 additions & 1 deletion src/input/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ export interface TdInputProps {
*/
readonly?: boolean;
/**
* 输入框状态。默认情况会由组件内部根据实际情况呈现,如果文本过长引起的状态变化
* 输入框状态
* @default default
*/
status?: 'default' | 'success' | 'warning' | 'error';
/**
Expand Down

0 comments on commit a02e0fe

Please sign in to comment.