Pārlūkot izejas kodu

docs(input): update prefix, suffix, addonBefore, addonAfter

走鹃 3 gadi atpakaļ
vecāks
revīzija
18e2746630
2 mainītis faili ar 10 papildinājumiem un 1 dzēšanām
  1. 4 0
      content/input/input/index-en-US.md
  2. 6 1
      content/input/input/index.md

+ 4 - 0
content/input/input/index-en-US.md

@@ -66,6 +66,8 @@ import { Input } from '@douyinfe/semi-ui';
 
 ### Prefix/Suffix
 
+When the content of `prefix` and `suffix` is text or Semi Icon, the left and right margin will be automatically added. If it is a custom ReactNode, the left and right margin will be 0
+
 ```jsx live=true
 import React from 'react';
 import { Input, Typography } from '@douyinfe/semi-ui';
@@ -86,6 +88,8 @@ import { IconSearch } from '@douyinfe/semi-icons';
 
 ### Addon
 
+When the content of `addonBefore` and `addonAfter` is text or Semi Icon, the left and right margin will be automatically added. If it is a custom ReactNode, the left and right margin will be 0.
+
 ```jsx live=true
 import React from 'react';
 import { Input } from '@douyinfe/semi-ui';

+ 6 - 1
content/input/input/index.md

@@ -68,7 +68,10 @@ import { Input } from '@douyinfe/semi-ui';
 
 ### 前缀/后缀
 
-在输入框上增加前缀、后缀图标,可以是 ReactNode 。
+在输入框上增加前缀、后缀图标,可以是 ReactNode
+
+当 prefix、suffix 传入的内容为文本或者 Semi Icon 时,会自动带上左右间隔,若为自定义 ReactNode,则左右间隔为 0
+
 
 ```jsx live=true
 import React from 'react';
@@ -92,6 +95,8 @@ import { IconSearch } from '@douyinfe/semi-icons';
 
 在输入框上增加前置/后置标签
 
+当 addonBefore、addonAfter 传入的内容为文本或者 Semi Icon 时,会自动带上左右间隔,若为自定义 ReactNode,则左右间隔为 0
+
 ```jsx live=true
 import React from 'react';
 import { Input } from '@douyinfe/semi-ui';