From: Ajay Bura Date: Thu, 30 Dec 2021 06:07:18 +0000 (+0530) Subject: Add checkbox component X-Git-Tag: v1.7.0~70 X-Git-Url: https://git.wafflesoft.org/?a=commitdiff_plain;h=d3dcb320f4982637ea85f5606a3b37c23acb05c7;p=rainny.git Add checkbox component Signed-off-by: Ajay Bura --- diff --git a/src/app/atoms/button/Checkbox.jsx b/src/app/atoms/button/Checkbox.jsx new file mode 100644 index 0000000..5bac0c0 --- /dev/null +++ b/src/app/atoms/button/Checkbox.jsx @@ -0,0 +1,30 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import './Checkbox.scss'; + +function Checkbox({ variant, isActive, onToggle }) { + const className = `checkbox checkbox-${variant}${isActive ? ' checkbox--active' : ''}`; + if (onToggle === null) return ; + return ( + // eslint-disable-next-line jsx-a11y/control-has-associated-label +