mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-22 21:14:18 +00:00
23 lines
725 B
JavaScript
23 lines
725 B
JavaScript
|
import React from "react"
|
||
|
import Style from "./ConditionBadge.module.css"
|
||
|
import classNames from "classnames"
|
||
|
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome"
|
||
|
import ButtonSmallX from "./ButtonSmallX"
|
||
|
|
||
|
|
||
|
export default function ConditionBadge({ color, icon, onDelete, children, className, ...props }) {
|
||
|
return (
|
||
|
<div className={classNames(Style.ConditionBadge, Style[`ConditionBadge${color}`], className)} {...props}>
|
||
|
<div className={Style.Icon}>
|
||
|
<FontAwesomeIcon icon={icon}/>
|
||
|
</div>
|
||
|
<div>
|
||
|
{children}
|
||
|
</div>
|
||
|
<div>
|
||
|
<ButtonSmallX onClick={onDelete}/>
|
||
|
</div>
|
||
|
</div>
|
||
|
)
|
||
|
}
|