mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2025-10-16 06:03:37 +02:00
Add className prop to CheckBox and Radio components
This commit is contained in:
@@ -17,17 +17,19 @@ CheckBox.propTypes = {
|
||||
helpText: PropTypes.string,
|
||||
/** Control if checkbox is clickable */
|
||||
disabled: PropTypes.bool,
|
||||
/** Additional class name */
|
||||
className: PropTypes.string,
|
||||
};
|
||||
|
||||
CheckBox.defaultProps = {
|
||||
disabled: false,
|
||||
};
|
||||
|
||||
function CheckBox({ label, helpText, disabled, ...props }) {
|
||||
function CheckBox({ label, helpText, disabled, className, ...props }) {
|
||||
const uid = useUID();
|
||||
|
||||
return (
|
||||
<div className="mb-3 form-check">
|
||||
<div className={`${className || "mb-3"} form-check`.trim()}>
|
||||
<input
|
||||
className="form-check-input"
|
||||
type="checkbox"
|
||||
|
Reference in New Issue
Block a user