ant-design/components/alert/demo/action.tsx
kiner-tang(文辉) 6b924029f1
demo: set button type in alert demo (#43567)
* fix: set button type in alert ghost button

* fix: set button type in alert ghost button

* feat: update snapshots
2023-07-14 19:36:36 +08:00

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;