2021-05-18 15:51:36 +00:00
|
|
|
import React from "react"
|
|
|
|
import Style from "./SummaryLeft.module.css"
|
|
|
|
import classNames from "classnames"
|
|
|
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
|
|
|
|
|
|
|
|
|
2021-05-23 15:35:38 +00:00
|
|
|
export default function SummaryLeft({ icon, title, subtitle, className, onClick, disabled, ...props }) {
|
|
|
|
const _onClick = disabled ? null : onClick
|
|
|
|
|
2021-05-18 15:51:36 +00:00
|
|
|
return (
|
|
|
|
<div
|
2021-05-23 15:35:38 +00:00
|
|
|
className={classNames(
|
|
|
|
Style.SummaryLeft,
|
|
|
|
onClick ? "Clickable" : null,
|
|
|
|
(onClick && disabled) ? "Disabled" : null,
|
|
|
|
className
|
|
|
|
)}
|
|
|
|
onClick={_onClick}
|
2021-05-18 15:51:36 +00:00
|
|
|
{...props}
|
|
|
|
>
|
|
|
|
<div className={Style.IconContainer}>
|
|
|
|
<FontAwesomeIcon icon={icon}/>
|
|
|
|
</div>
|
|
|
|
<div className={Style.Title}>
|
|
|
|
{title}
|
|
|
|
</div>
|
|
|
|
<div className={Style.Subtitle}>
|
|
|
|
{subtitle}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|