mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-15 17:31:25 +08:00
43 lines
834 B
TypeScript
43 lines
834 B
TypeScript
|
import React from 'react';
|
||
|
import { Button, Divider, Tooltip } from 'antd';
|
||
|
|
||
|
const colors = [
|
||
|
'pink',
|
||
|
'red',
|
||
|
'yellow',
|
||
|
'orange',
|
||
|
'cyan',
|
||
|
'green',
|
||
|
'blue',
|
||
|
'purple',
|
||
|
'geekblue',
|
||
|
'magenta',
|
||
|
'volcano',
|
||
|
'gold',
|
||
|
'lime',
|
||
|
];
|
||
|
const customColors = ['#f50', '#2db7f5', '#87d068', '#108ee9'];
|
||
|
|
||
|
const App: React.FC = () => (
|
||
|
<>
|
||
|
<Divider orientation="left">Presets</Divider>
|
||
|
<div>
|
||
|
{colors.map(color => (
|
||
|
<Tooltip title="prompt text" color={color} key={color}>
|
||
|
<Button>{color}</Button>
|
||
|
</Tooltip>
|
||
|
))}
|
||
|
</div>
|
||
|
<Divider orientation="left">Custom</Divider>
|
||
|
<div>
|
||
|
{customColors.map(color => (
|
||
|
<Tooltip title="prompt text" color={color} key={color}>
|
||
|
<Button>{color}</Button>
|
||
|
</Tooltip>
|
||
|
))}
|
||
|
</div>
|
||
|
</>
|
||
|
);
|
||
|
|
||
|
export default App;
|