mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-30 00:14:19 +00:00
23 lines
657 B
JavaScript
23 lines
657 B
JavaScript
|
import React from "react"
|
||
|
import Style from "./BoxAlert.module.css"
|
||
|
import classNames from "classnames"
|
||
|
|
||
|
|
||
|
/**
|
||
|
* A colored alert box to draw the user's attention.
|
||
|
*
|
||
|
* @param color - The color of the alert.
|
||
|
* @param children - The contents of the alert.
|
||
|
* @param className - Additional class(es) to add to the div.
|
||
|
* @param props - Additional props to pass to the div.
|
||
|
* @returns {JSX.Element}
|
||
|
* @constructor
|
||
|
*/
|
||
|
export default function BoxAlert({ color, children, className, ...props }) {
|
||
|
return (
|
||
|
<div className={classNames(Style.BoxAlert, Style[`BoxAlert${color}`], className)} {...props}>
|
||
|
{children}
|
||
|
</div>
|
||
|
)
|
||
|
}
|