1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-24 14:04:19 +00:00
pds-2021-g2-nest/nest_frontend/components/base/formparts/FormAlert.js

23 lines
627 B
JavaScript
Raw Normal View History

2021-04-26 16:36:41 +00:00
import React from "react"
import Style from "./FormAlert.module.css"
import classNames from "classnames"
2021-05-24 12:49:59 +00:00
import Alert from "../Alert"
2021-04-26 16:36:41 +00:00
/**
2021-05-24 12:49:59 +00:00
* A {@link Alert} ready to be used in a {@link FormLabelled}.
2021-04-26 16:36:41 +00:00
*
* @param children - The contents of the alert.
* @param className - Additional class(es) to add to the box.
* @param props - Additional props to pass to the box.
* @returns {JSX.Element}
* @constructor
*/
export default function FormAlert({ children, className, ...props }) {
return (
2021-05-24 12:49:59 +00:00
<Alert className={classNames(Style.FormAlert, className)} {...props}>
2021-04-26 16:36:41 +00:00
{children}
2021-05-24 12:49:59 +00:00
</Alert>
2021-04-26 16:36:41 +00:00
)
}