소스 검색

docs: update CustomIcon demo (#980)

YannLynn 3 년 전
부모
커밋
65ad7a4aa8
4개의 변경된 파일6개의 추가작업 그리고 6개의 파일을 삭제
  1. 2 2
      content/basic/icon/index-en-US.md
  2. 2 2
      content/basic/icon/index.md
  3. 1 1
      content/show/table/index-en-US.md
  4. 1 1
      content/show/table/index.md

+ 2 - 2
content/basic/icon/index-en-US.md

@@ -97,7 +97,7 @@ import { IconLikeHeart, IconFlag, IconLock, IconUnlock } from '@douyinfe/semi-ic
 
 ### Custom icon
 You can use custom icons to pass in Icon components
-Icon component supports size, rotate, spinning and other attributes
+Icon component supports size, rotate, spin and other attributes
 
 ```jsx live=true
 import React from 'react';
@@ -105,7 +105,7 @@ import { Icon } from '@douyinfe/semi-ui';
 
 () => {
     function CustomIcon(){
-        return <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+        return <svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
             <circle cx="12" cy="12" r="11" fill="#FBCD2C"/>
             <mask id="mask0" maskType="alpha" maskUnits="userSpaceOnUse" x="1" y="1" width="22" height="22">
                 <circle cx="12" cy="12" r="11" fill="#A2845E"/>

+ 2 - 2
content/basic/icon/index.md

@@ -96,7 +96,7 @@ import { IconLikeHeart, IconFlag, IconLock, IconUnlock } from '@douyinfe/semi-ic
 
 ### 自定义图标
 可以使用自定义图标传入Icon组件
-Icon组件支持size、rotate、spining等属性
+Icon组件支持size、rotate、spin等属性
 
 ```jsx live=true
 import React from 'react';
@@ -104,7 +104,7 @@ import { Icon } from '@douyinfe/semi-ui';
 
 () => {
     function CustomIcon(){
-        return <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+        return <svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
             <circle cx="12" cy="12" r="11" fill="#FBCD2C"/>
             <mask id="mask0" maskType="alpha" maskUnits="userSpaceOnUse" x="1" y="1" width="22" height="22">
                 <circle cx="12" cy="12" r="11" fill="#A2845E"/>

+ 1 - 1
content/show/table/index-en-US.md

@@ -4378,7 +4378,7 @@ render(App);
 | empty                   | Content displayed when there is no data                                                                                   | ReactNode                                                                                                          | ReactNode  | 'No data yet. '                                                   |
 | expandCellFixed         | Whether the column of the expansion icon is fixed or not, the same value as the fixed value in Column                     | boolean\|string                                                                                                 | false      |
 | expandIcon              | Custom expansion icon, hidden when it is `false`                                                                          | boolean <br/>\|ReactNode <br/>\| (expanded: boolean) => ReactNode                                               |            |
-| expandedRowKeys         | Expanded rows, the row expansion function will be controlled when this parameter is introduced.                           | (string | number)[]                                                                                                 |            |
+| expandedRowKeys         | Expanded rows, the row expansion function will be controlled when this parameter is introduced.                           | (string \| number)[]                                                                                                 |            |
 | expandedRowRender       | Extra unfolding lines                                                                                                     | (record: object, index: number, expanded: boolean) => ReactNode                                                 |            |
 | expandAllRows           | All rows are expanded                                                           | boolean                                                                                                         | false      | **1.30.0**
 | expandAllGroupRows      | All grouped rows are expanded                                                           | boolean                                                                                                         | false      | **1.30.0**

+ 1 - 1
content/show/table/index.md

@@ -4384,7 +4384,7 @@ render(App);
 | empty                     | 无数据时展示的内容                                                                                             | ReactNode                                                                                                       | '暂无数据' |
 | expandCellFixed           | 展开图标所在列是否固定,与 Column 中的 fixed 取值相同                                                          | boolean\|string                                                                                                 | false      |
 | expandIcon                | 自定义展开按钮,传 `false` 关闭默认的渲染                                                                      | boolean \| ReactNode<br/> \| (expanded: boolean) => ReactNode                                                   |            |
-| expandedRowKeys           | 展开的行,传入此参数时行展开功能将受控                                                                         | (string                                                                                                         | number)[]  |                                         |
+| expandedRowKeys           | 展开的行,传入此参数时行展开功能将受控                                                                         | (string \| number)[]  |                                         |
 | expandedRowRender         | 额外的展开行                                                                                                   | (record: object, index: number, expanded: boolean) => ReactNode                                                 |            |
 | expandAllRows             | 是否展开所有行                                                                                                 | boolean                                                                                                         | false      | **1.30.0**                              |
 | expandAllGroupRows        | 是否展开分组行                                                                                                 | boolean                                                                                                         | false      | **1.30.0**                              |