1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-22 21:14:18 +00:00
pds-2021-g2-nest/code/frontend/src/components/ConditionBadge.js

23 lines
725 B
JavaScript
Raw Normal View History

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>
)
}