mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-24 09:45:35 +08:00
chore: refactor listen to input change
This commit is contained in:
parent
d2b5c17d8c
commit
adfa4324ef
@ -30,12 +30,12 @@ const Collapse: ParentComponent<Props> = (props) => {
|
|||||||
'collapse collapse-arrow overflow-visible border-secondary bg-base-200',
|
'collapse collapse-arrow overflow-visible border-secondary bg-base-200',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div
|
<input
|
||||||
class="collapse-title text-xl font-medium"
|
type="checkbox"
|
||||||
onClick={() => onCollapse(!props.isOpen)}
|
onChange={(e) => onCollapse(e.target.checked)}
|
||||||
>
|
checked={props.isOpen}
|
||||||
{title}
|
/>
|
||||||
</div>
|
<div class="collapse-title text-xl font-medium">{title}</div>
|
||||||
<div
|
<div
|
||||||
class={twMerge(
|
class={twMerge(
|
||||||
getCollapseContentClassName(),
|
getCollapseContentClassName(),
|
||||||
|
Loading…
Reference in New Issue
Block a user