Skip to content

Commit

Permalink
📝 chore: add demo
Browse files Browse the repository at this point in the history
  • Loading branch information
rdmclin2 committed Dec 19, 2023
1 parent 8a593e0 commit a688e9a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/ColumnList/demos/creatorButtonPropsFalse.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* title: 不可添加
* title: 关闭添加能力
* description: 可通过 `creatorButtonProps={false}` 来关闭添加功能,包括添加一行按钮,回车添加以及空状态添加
*/
import type { ColumnItemList } from '@ant-design/pro-editor';
Expand Down
21 changes: 21 additions & 0 deletions src/SortableList/demos/hideRemove.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* title: 隐藏删除按钮
* description: 你可以设置 `hideRemove` 属性来隐藏默认的删除按钮
* compact: true
*/
import { SortableList } from '@ant-design/pro-editor';
import { useTheme } from 'antd-style';
import { Flexbox } from 'react-layout-kit';

const list = ['hello', 'world'];

const Demo = () => {
const token = useTheme();
return (
<Flexbox padding={24} style={{ background: token.colorBgLayout }}>
<SortableList initialValues={list} hideRemove />
</Flexbox>
);
};

export default Demo;
1 change: 1 addition & 0 deletions src/SortableList/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ demo:

<code src="./demos/Basic.tsx" ></code>
<code src="./demos/controlled.tsx" ></code>
<code src="./demos/hideRemove.tsx" ></code>
<code src="./demos/getItemStyles.tsx" ></code>
<code src="./demos/renderItem.tsx" ></code>
<code src="./demos/renderContent.tsx" ></code>
Expand Down

0 comments on commit a688e9a

Please sign in to comment.