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: button component token (ant-design#44090)
* feat: button component token * chore: add demo * chore: update
- Loading branch information
Showing
11 changed files
with
573 additions
and
63 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 | ||
|
||
组件 Token,模仿 MUI 风格的 Button | ||
|
||
## en-US | ||
|
||
Component Token. Button with MUI style. |
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,44 @@ | ||
import React from 'react'; | ||
import { Button, ConfigProvider, Space } from 'antd'; | ||
|
||
const App: React.FC = () => ( | ||
<ConfigProvider | ||
theme={{ | ||
components: { | ||
Button: { | ||
algorithm: true, | ||
colorPrimary: '#1976d2', | ||
controlHeight: 36, | ||
primaryShadow: | ||
'0px 3px 1px -2px rgba(0,0,0,0.2), 0px 2px 2px 0px rgba(0,0,0,0.14), 0px 1px 5px 0px rgba(0,0,0,0.12)', | ||
fontWeight: 500, | ||
defaultBorderColor: 'rgba(25, 118, 210, 0.5)', | ||
colorText: '#1976d2', | ||
defaultColor: '#1976d2', | ||
borderRadius: 4, | ||
colorTextDisabled: 'rgba(0, 0, 0, 0.26)', | ||
colorBgContainerDisabled: 'rgba(0, 0, 0, 0.12)', | ||
}, | ||
}, | ||
}} | ||
> | ||
<Space direction="vertical"> | ||
<Space wrap> | ||
<Button type="text">TEXT</Button> | ||
<Button type="primary">CONTAINED</Button> | ||
<Button>OUTLINED</Button> | ||
</Space> | ||
<Space wrap> | ||
<Button type="text" disabled> | ||
TEXT | ||
</Button> | ||
<Button type="primary" disabled> | ||
CONTAINED | ||
</Button> | ||
<Button disabled>OUTLINED</Button> | ||
</Space> | ||
</Space> | ||
</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
Oops, something went wrong.