-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: develop BlockHeader doc (#298)
* feat: develop BlockHeader doc * feat: supplementary BlockHeader unit test * docs: optimized blockerHeader customIcon and size demos * refactor: blockHeader api and className * test: fix unit test
- Loading branch information
1 parent
8738c61
commit f98dd6b
Showing
13 changed files
with
129 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,16 @@ | ||
import React from 'react'; | ||
import React, { useState } from 'react'; | ||
import { BlockHeader } from 'dt-react-component'; | ||
import { Switch } from 'antd'; | ||
|
||
export default () => { | ||
return <BlockHeader title="分类标题" />; | ||
const [showBackground, setShowBackground] = useState(true); | ||
return ( | ||
<> | ||
背景: | ||
<Switch defaultChecked onChange={setShowBackground} /> | ||
<br /> | ||
<br /> | ||
<BlockHeader title="分类标题" showBackground={showBackground} /> | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,21 @@ | ||
import React from 'react'; | ||
import { PieChartOutlined } from '@ant-design/icons'; | ||
import { PieChartOutlined, PauseCircleOutlined } from '@ant-design/icons'; | ||
import { BlockHeader } from 'dt-react-component'; | ||
import { Divider } from 'antd'; | ||
|
||
export default () => { | ||
return ( | ||
<> | ||
<BlockHeader title="分类标题" /> | ||
<br /> | ||
<BlockHeader | ||
title="分类标题" | ||
beforeTitle={<PieChartOutlined style={{ fontSize: '14px' }} />} | ||
/> | ||
<Divider /> | ||
<BlockHeader title="分类标题" beforeTitle="" /> | ||
<br /> | ||
<BlockHeader | ||
title="分类标题" | ||
beforeTitle={<PauseCircleOutlined style={{ fontSize: '14px' }} />} | ||
/> | ||
</> | ||
); | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react'; | ||
import { BlockHeader } from 'dt-react-component'; | ||
|
||
export default () => { | ||
return ( | ||
<> | ||
<BlockHeader title="分类标题" afterTitle="说明文字" /> | ||
<br /> | ||
<BlockHeader title="分类标题" tooltip="hover展示更多" /> | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React, { useState } from 'react'; | ||
import { Radio } from 'antd'; | ||
import { BlockHeader } from 'dt-react-component'; | ||
import { SizeType } from 'dt-react-component/esm/blockHeader'; | ||
|
||
export default () => { | ||
const [size, setSize] = useState<SizeType>('middle'); | ||
return ( | ||
<> | ||
<Radio.Group value={size} onChange={(e) => setSize(e.target.value)}> | ||
<Radio.Button value="middle">Default</Radio.Button> | ||
<Radio.Button value="small">Small</Radio.Button> | ||
</Radio.Group> | ||
<br /> | ||
<br /> | ||
<BlockHeader title="分类标题" size={size} /> | ||
</> | ||
); | ||
}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.