Skip to content

Commit ba59dff

Browse files
authored
docs: blockHeader docs use size (#468)
1 parent a458488 commit ba59dff

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

src/blockHeader/__tests__/blockHeader.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ describe('test BlockHeader render', () => {
9090
expect(getByText('说明文字')).toHaveClass(`${prefixCls}-after-title`);
9191
expect(getByText('Icon')).toBeTruthy();
9292
});
93-
test('should render BlockHeader className when isSmall is small', () => {
93+
test('should render BlockHeader props without background', () => {
9494
const props = { title: '测试1', showBackground: false };
9595
const { container } = render(<BlockHeader {...props} />);
9696
const wrap = container.firstChild;
9797
expect(wrap!.firstChild).not.toHaveClass(`background`);
9898
});
99-
test('should render BlockHeader className when isSmall is small', () => {
99+
test('should render BlockHeader className when size is small', () => {
100100
const { container, getByText } = render(<BlockHeader {...props2} />);
101101
const wrap = container.firstChild!;
102102
expect(wrap).toHaveClass(`${prefixCls}`);

src/blockHeader/index.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@ demo:
2727

2828
### BlockHeader
2929

30-
| 参数 | 说明 | 类型 | 默认值 |
31-
| ----------------- | ----------------------------------------- | --------------------------- | ------- |
32-
| title | 标题 | `React.ReactNode` | - |
33-
| beforeTitle | 标题前的图标,默认是一个色块 | `React.ReactNode` | - |
34-
| afterTitle | 标题后的提示图标或文案 | `React.ReactNode` | - |
35-
| tooltip | 默认展示问号提示(优先级低于 `afterTitle`) | `React.ReactNode` | - |
36-
| isSmall | 大标题、小标题,默认为大标题 | `boolean` | `false` |
37-
| titleRowClassName | 标题一行的样式类名 | `string` | - |
38-
| titleClassName | 标题的样式类名 | `string` | - |
39-
| showBackground | 是否显示背景 | `boolean` | `true` |
40-
| defaultExpand | 是否默认展开内容 | `boolean` | `true` |
41-
| hasBottom | 是否有默认下边距 16px | `boolean` | `false` |
42-
| spaceBottom | 自定义下边距,优先级高于 hasBottom | `number` | `0` |
43-
| children | 展开/收起的内容 | `React.ReactNode` | - |
44-
| onChange | 展开/收起时的回调 | `(expand: boolean) => void` | - |
30+
| 参数 | 说明 | 类型 | 默认值 |
31+
| ----------------- | ----------------------------------------- | --------------------------- | -------- | -------- |
32+
| title | 标题 | `React.ReactNode` | - |
33+
| beforeTitle | 标题前的图标,默认是一个色块 | `React.ReactNode` | - |
34+
| afterTitle | 标题后的提示图标或文案 | `React.ReactNode` | - |
35+
| tooltip | 默认展示问号提示(优先级低于 `afterTitle`) | `React.ReactNode` | - |
36+
| size | 小标题(small)、中标题(middle) | `small` | `middle` | `middle` |
37+
| titleRowClassName | 标题一行的样式类名 | `string` | - |
38+
| titleClassName | 标题的样式类名 | `string` | - |
39+
| showBackground | 是否显示背景 | `boolean` | `true` |
40+
| defaultExpand | 是否默认展开内容 | `boolean` | `true` |
41+
| hasBottom | 是否有默认下边距 16px | `boolean` | `false` |
42+
| spaceBottom | 自定义下边距,优先级高于 hasBottom | `number` | `0` |
43+
| children | 展开/收起的内容 | `React.ReactNode` | - |
44+
| onChange | 展开/收起时的回调 | `(expand: boolean) => void` | - |

0 commit comments

Comments
 (0)