mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-27 10:44:02 +08:00
refactor: typos
This commit is contained in:
parent
0c3c908d4f
commit
320998a7e9
@ -7,18 +7,18 @@ export const ForTwoColumns = (props: { subChild: JSX.Element[] }) => {
|
|||||||
const isShowTwoColumns = createMemo(
|
const isShowTwoColumns = createMemo(
|
||||||
() => windowSize.width >= 640 && renderInTwoColumns(),
|
() => windowSize.width >= 640 && renderInTwoColumns(),
|
||||||
) // 640 is sm size in daisyui
|
) // 640 is sm size in daisyui
|
||||||
const leftCloumns = createMemo(() =>
|
const leftColumns = createMemo(() =>
|
||||||
props.subChild.filter((_, index) => index % 2 === 0 || !isShowTwoColumns()),
|
props.subChild.filter((_, index) => index % 2 === 0 || !isShowTwoColumns()),
|
||||||
)
|
)
|
||||||
const rightCloumns = createMemo(() =>
|
const rightColumns = createMemo(() =>
|
||||||
props.subChild.filter((_, index) => index % 2 === 1),
|
props.subChild.filter((_, index) => index % 2 === 1),
|
||||||
)
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<div class="flex flex-1 flex-col">{leftCloumns()}</div>
|
<div class="flex flex-1 flex-col">{leftColumns()}</div>
|
||||||
<Show when={isShowTwoColumns()}>
|
<Show when={isShowTwoColumns()}>
|
||||||
<div class="ml-2 flex flex-1 flex-col">{rightCloumns()}</div>
|
<div class="ml-2 flex flex-1 flex-col">{rightColumns()}</div>
|
||||||
</Show>
|
</Show>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user