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(badge): migrate less to token (ant-design#42778)
* chore: update * docs: add component token demo * test: update snapshot * chore: update * test: update snapshot * feat: token * chore: update snapshot * chore: code clean * chore: code clean * chore: code clean * chore: code clean * chore: update * chore: fix lint * fix: fontsizesm --------- Co-authored-by: MadCcc <[email protected]>
- Loading branch information
Showing
10 changed files
with
466 additions
and
73 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 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 | ||
|
||
Component 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,32 @@ | ||
import { NotificationOutlined } from '@ant-design/icons'; | ||
import React from 'react'; | ||
import { Avatar, Badge, ConfigProvider, Space } from 'antd'; | ||
|
||
/** Test usage. Do not use in your production. */ | ||
export default () => ( | ||
<ConfigProvider | ||
theme={{ | ||
components: { | ||
Badge: { | ||
indicatorHeight: 24, | ||
indicatorHeightSM: 18, | ||
dotSize: 4, | ||
textFontWeight: 'bold', | ||
statusSize: 8, | ||
}, | ||
}, | ||
}} | ||
> | ||
<Space direction="vertical"> | ||
<Badge count={5}> | ||
<Avatar shape="square" size="large" /> | ||
</Badge> | ||
<Badge count={26} /> | ||
<Badge dot> | ||
<NotificationOutlined /> | ||
</Badge> | ||
<Badge status="success" text="Success" /> | ||
<Badge size="small" count={0} showZero /> | ||
</Space> | ||
</ConfigProvider> | ||
); |
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.