| 1 |
import { Fragment } from 'react'; |
| 2 |
import { Alert, AlertActionCloseButton, AlertActionLink } from '@patternfly/react-core'; |
| 3 |
|
| 4 |
export const AlertExpandable: React.FunctionComponent = () => ( |
| 5 |
<Fragment> |
| 6 |
<Alert |
| 7 |
isExpandable |
| 8 |
variant="success" |
| 9 |
title="Success alert title" |
| 10 |
// eslint-disable-next-line no-console |
| 11 |
actionClose={<AlertActionCloseButton onClose={() => console.log('Clicked the close button')} />} |
| 12 |
> |
| 13 |
<p>Success alert description. This should tell the user more information about the alert.</p> |
| 14 |
</Alert> |
| 15 |
<Alert |
| 16 |
isExpandable |
| 17 |
isInline |
| 18 |
variant="success" |
| 19 |
title="Success alert title" |
| 20 |
actionLinks={ |
| 21 |
<Fragment> |
| 22 |
<AlertActionLink component="a" href="#"> |
| 23 |
View details |
| 24 |
</AlertActionLink> |
| 25 |
<AlertActionLink // eslint-disable-next-line no-console |
| 26 |
onClick={() => console.log('Clicked on Ignore')} |
| 27 |
> |
| 28 |
Ignore |
| 29 |
</AlertActionLink> |
| 30 |
</Fragment> |
| 31 |
} |
| 32 |
> |
| 33 |
<p>Success alert description. This should tell the user more information about the alert.</p> |
| 34 |
</Alert> |
| 35 |
</Fragment> |
| 36 |
); |