Skip to content
Open
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
8 changes: 1 addition & 7 deletions src/blockHeader/demos/expand.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,12 @@ export default () => {
<BlockHeader
title="非受控标题"
defaultExpand={false}
hasBottom
onExpand={(expand) => console.log(expand)}
>
Hello World!
</BlockHeader>

<BlockHeader
title="受控标题"
expand={expand}
onExpand={(expand) => setExpand(expand)}
hasBottom
>
<BlockHeader title="受控标题" expand={expand} onExpand={(expand) => setExpand(expand)}>
Hello World!
</BlockHeader>

Expand Down
2 changes: 1 addition & 1 deletion src/blockHeader/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ demo:
| background | 是否显示背景 | `boolean` | `true` |
| defaultExpand | 是否默认展开内容 | `boolean` | `-` |
| expand | 当前展开状态 | `boolean` | |
| spaceBottom | 自定义下边距,优先级高于 hasBottom | `number` | `16` |
| spaceBottom | 自定义下边距 | `number` | `16` |
| children | 展开/收起的内容 | `React.ReactNode` | - |
| onExpand | 展开/收起时的回调 | `(expand: boolean) => void` | - |
Loading