mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2024-12-25 00:11:36 +01:00
Add className prop to Switch component
This commit is contained in:
parent
c209796118
commit
923bbab6d5
|
@ -19,15 +19,16 @@ Switch.propTypes = {
|
|||
]).isRequired,
|
||||
helpText: PropTypes.string,
|
||||
switchHeading: PropTypes.bool,
|
||||
className: PropTypes.string,
|
||||
};
|
||||
|
||||
function Switch({ label, helpText, switchHeading, ...props }) {
|
||||
function Switch({ label, helpText, switchHeading, className, ...props }) {
|
||||
const uid = useUID();
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`form-check form-switch mb-3 ${
|
||||
switchHeading ? "d-flex align-items-center" : null
|
||||
className={`form-check form-switch ${className || "mb-3"} ${
|
||||
switchHeading ? "d-flex align-items-center" : ""
|
||||
}`.trim()}
|
||||
>
|
||||
<input
|
||||
|
|
Loading…
Reference in New Issue
Block a user