Debian Codegraph @

node/@patternfly/react-core/src/components/Alert/examples/AlertInlineVariations.tsx

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