| 1 |
import { css } from '@patternfly/react-styles'; |
| 2 |
import styles from '@patternfly/react-styles/css/components/Form/form'; |
| 3 |
|
| 4 |
export interface FormAlertProps extends React.HTMLProps<HTMLDivElement> { |
| 5 |
/** An inline PatternFly Alert. */ |
| 6 |
children?: React.ReactNode; |
| 7 |
/** Additional classes added to the FormGroup. */ |
| 8 |
className?: string; |
| 9 |
} |
| 10 |
|
| 11 |
export const FormAlert: React.FunctionComponent<FormAlertProps> = ({ |
| 12 |
children = null, |
| 13 |
className = '', |
| 14 |
...props |
| 15 |
}: FormAlertProps) => ( |
| 16 |
// There are currently no associated styles with the pf-v6-c-form_alert class. |
| 17 |
// Therefore, it does not exist in react-styles |
| 18 |
<div {...props} className={css(`${styles.form}__alert`, className)}> |
| 19 |
{children} |
| 20 |
</div> |
| 21 |
); |
| 22 |
FormAlert.displayName = 'FormAlert'; |