mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 13:00:39 +03:00
M: Improve checkbox structure
This commit is contained in:
parent
d11ccb45c4
commit
2b73f5e6af
|
@ -65,6 +65,7 @@ function Checkbox({
|
||||||
<div
|
<div
|
||||||
className={clsx(
|
className={clsx(
|
||||||
'max-w-[1rem] min-w-[1rem] h-4', // prettier: split lines
|
'max-w-[1rem] min-w-[1rem] h-4', // prettier: split lines
|
||||||
|
'pt-[0.1rem] pl-[0.1rem]',
|
||||||
'border rounded-sm',
|
'border rounded-sm',
|
||||||
'cc-animate-color',
|
'cc-animate-color',
|
||||||
{
|
{
|
||||||
|
@ -73,11 +74,7 @@ function Checkbox({
|
||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{value ? (
|
{value ? <CheckboxChecked /> : null}
|
||||||
<div className='mt-[1px] ml-[1px]'>
|
|
||||||
<CheckboxChecked />
|
|
||||||
</div>
|
|
||||||
) : null}
|
|
||||||
</div>
|
</div>
|
||||||
{label ? <span className={clsx('text-start text-sm whitespace-nowrap select-text', cursor)}>{label}</span> : null}
|
{label ? <span className={clsx('text-start text-sm whitespace-nowrap select-text', cursor)}>{label}</span> : null}
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -66,6 +66,7 @@ function CheckboxTristate({
|
||||||
<div
|
<div
|
||||||
className={clsx(
|
className={clsx(
|
||||||
'w-4 h-4', // prettier: split lines
|
'w-4 h-4', // prettier: split lines
|
||||||
|
'pt-[0.1rem] pl-[0.1rem]',
|
||||||
'border rounded-sm',
|
'border rounded-sm',
|
||||||
'cc-animate-color',
|
'cc-animate-color',
|
||||||
{
|
{
|
||||||
|
@ -74,16 +75,8 @@ function CheckboxTristate({
|
||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{value ? (
|
{value ? <CheckboxChecked /> : null}
|
||||||
<div className='mt-[1px] ml-[1px]'>
|
{value == null ? <CheckboxNull /> : null}
|
||||||
<CheckboxChecked />
|
|
||||||
</div>
|
|
||||||
) : null}
|
|
||||||
{value == null ? (
|
|
||||||
<div className='mt-[1px] ml-[1px]'>
|
|
||||||
<CheckboxNull />
|
|
||||||
</div>
|
|
||||||
) : null}
|
|
||||||
</div>
|
</div>
|
||||||
{label ? <span className={clsx('text-start text-sm whitespace-nowrap select-text', cursor)}>{label}</span> : null}
|
{label ? <span className={clsx('text-start text-sm whitespace-nowrap select-text', cursor)}>{label}</span> : null}
|
||||||
</button>
|
</button>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user