forked from ant-design/ant-design
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Divider Component Token (ant-design#42627)
* feat: Divider Component Token * feat: 更改token命名规范 * feat: 增加token demo * test: Update Test Snapshots * feat: token * chore: update * fix: lint * chore: lint * chore: update snapshot --------- Co-authored-by: MadCcc <[email protected]>
- Loading branch information
Showing
9 changed files
with
278 additions
and
15 deletions.
There are no files selected for viewing
77 changes: 77 additions & 0 deletions
77
components/divider/__tests__/__snapshots__/demo-extend.test.ts.snap
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
75 changes: 75 additions & 0 deletions
75
components/divider/__tests__/__snapshots__/demo.test.ts.snap
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## zh-CN | ||
|
||
组件 Token Debug. | ||
|
||
## en-US | ||
|
||
Component Token Debug. |
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,58 @@ | ||
import React from 'react'; | ||
import { ConfigProvider, Divider } from 'antd'; | ||
|
||
const App: React.FC = () => ( | ||
<ConfigProvider | ||
theme={{ | ||
token: { | ||
margin: 24, | ||
marginLG: 48, | ||
lineWidth: 5, | ||
colorSplit: '#1677ff', | ||
}, | ||
components: { | ||
Divider: { | ||
verticalMarginInline: 16, | ||
textPaddingInline: 16, | ||
orientationMargin: 0.2, | ||
}, | ||
}, | ||
}} | ||
> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista | ||
probare, quae sunt a te dicta? Refert tamen, quo modo. | ||
</p> | ||
<Divider>Text</Divider> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista | ||
probare, quae sunt a te dicta? Refert tamen, quo modo. | ||
</p> | ||
<Divider orientation='left'>Left Text</Divider> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista | ||
probare, quae sunt a te dicta? Refert tamen, quo modo. | ||
</p> | ||
<Divider orientation='right'>Right Text</Divider> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista | ||
probare, quae sunt a te dicta? Refert tamen, quo modo. | ||
</p> | ||
<Divider orientation='left' orientationMargin='0'> | ||
Left Text with 0 orientationMargin | ||
</Divider> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista | ||
probare, quae sunt a te dicta? Refert tamen, quo modo. | ||
</p> | ||
<Divider orientation='right' orientationMargin={50}> | ||
Right Text with 50px orientationMargin | ||
</Divider> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista | ||
probare, quae sunt a te dicta? Refert tamen, quo modo. | ||
</p> | ||
</ConfigProvider> | ||
); | ||
|
||
export default App; |
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 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 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