Debian Codegraph @

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

raw
1 import { Button, ButtonVariant, ButtonProps } from '../Button';
2
3 /** Renders buttons styled as links beneath the alert title and description when this sub-component
4 * is passed into the alert's actionLinks property.
5 */
6
7 export interface AlertActionLinkProps extends ButtonProps {
8 /** Content rendered inside the alert action link. Interactive content such as anchor elements should not be passed in. */
9 children?: React.ReactNode;
10 /** Additional classes added to the alert action link. */
11 className?: string;
12 }
13
14 export const AlertActionLink: React.FunctionComponent<AlertActionLinkProps> = ({
15 className = '',
16 children,
17 ...props
18 }: AlertActionLinkProps) => (
19 <Button variant={ButtonVariant.link} isInline className={className} {...props}>
20 {children}
21 </Button>
22 );
23 AlertActionLink.displayName = 'AlertActionLink';