- Fixing horizontal checkbox
This commit is contained in:
parent
d4858d809d
commit
33c0e362f5
@ -58,9 +58,9 @@ export const DropdownMenu = (props: DropdownProps) => {
|
|||||||
export const ToggleSwitch = ({ value, onChange, ref, children }:
|
export const ToggleSwitch = ({ value, onChange, ref, children }:
|
||||||
{ value: boolean, ref?: React.RefObject<HTMLInputElement>, onChange?: React.ChangeEventHandler, children: string }) => {
|
{ value: boolean, ref?: React.RefObject<HTMLInputElement>, onChange?: React.ChangeEventHandler, children: string }) => {
|
||||||
return <p>
|
return <p>
|
||||||
<span className="check-box">
|
<span className="check-box check-box-row">
|
||||||
<b>{children}</b>
|
<b>{children}:</b>
|
||||||
<input ref={ref} className="check-box" defaultChecked={value} onChange={onChange} type='checkbox' />
|
<input ref={ref} defaultChecked={value} onChange={onChange} type='checkbox' />
|
||||||
</span>
|
</span>
|
||||||
</p>;
|
</p>;
|
||||||
};
|
};
|
@ -113,6 +113,7 @@ header {
|
|||||||
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
|
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: 0.4s;
|
transition: 0.4s;
|
||||||
|
margin-bottom: revert;
|
||||||
}
|
}
|
||||||
|
|
||||||
.check-box input:checked[type="checkbox"] {
|
.check-box input:checked[type="checkbox"] {
|
||||||
@ -136,3 +137,9 @@ header {
|
|||||||
.check-box input:checked[type="checkbox"]::after {
|
.check-box input:checked[type="checkbox"]::after {
|
||||||
left: 50%;
|
left: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.check-box-row{
|
||||||
|
display: flex;
|
||||||
|
gap: 2px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user