mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 11:40:04 +08:00
6b924029f1
* fix: set button type in alert ghost button * fix: set button type in alert ghost button * feat: update snapshots
60 lines
1.3 KiB
TypeScript
60 lines
1.3 KiB
TypeScript
import React from 'react';
|
|
import { Alert, Button, Space } from 'antd';
|
|
|
|
const App: React.FC = () => (
|
|
<Space direction="vertical" style={{ width: '100%' }}>
|
|
<Alert
|
|
message="Success Tips"
|
|
type="success"
|
|
showIcon
|
|
action={
|
|
<Button size="small" type="text">
|
|
UNDO
|
|
</Button>
|
|
}
|
|
closable
|
|
/>
|
|
<Alert
|
|
message="Error Text"
|
|
showIcon
|
|
description="Error Description Error Description Error Description Error Description"
|
|
type="error"
|
|
action={
|
|
<Button size="small" danger>
|
|
Detail
|
|
</Button>
|
|
}
|
|
/>
|
|
<Alert
|
|
message="Warning Text"
|
|
type="warning"
|
|
action={
|
|
<Space>
|
|
<Button type="text" size="small" ghost>
|
|
Done
|
|
</Button>
|
|
</Space>
|
|
}
|
|
closable
|
|
/>
|
|
<Alert
|
|
message="Info Text"
|
|
description="Info Description Info Description Info Description Info Description"
|
|
type="info"
|
|
action={
|
|
<Space direction="vertical">
|
|
<Button size="small" type="primary">
|
|
Accept
|
|
</Button>
|
|
<Button size="small" danger ghost>
|
|
Decline
|
|
</Button>
|
|
</Space>
|
|
}
|
|
closable
|
|
/>
|
|
</Space>
|
|
);
|
|
|
|
export default App;
|