backup quiz

This commit is contained in:
Paul Miller
2023-05-09 19:12:41 -05:00
parent cda1fcac94
commit c8d28e01e6
5 changed files with 159 additions and 81 deletions

View File

@@ -1,8 +1,9 @@
import { JSX, ParentComponent, Show, Suspense } from "solid-js"
import { JSX, ParentComponent, Show, Suspense, createSignal } from "solid-js"
import Linkify from "./Linkify"
import { Button, ButtonLink } from "./Button"
import { Separator } from "@kobalte/core"
import { Checkbox as KCheckbox, Separator } from "@kobalte/core"
import { useMegaStore } from "~/state/megaStore"
import check from "~/assets/icons/check.svg"
export {
Button,
@@ -118,7 +119,7 @@ export const SmallAmount: ParentComponent<{ amount: number | bigint, sign?: stri
}
export const NiceP: ParentComponent = (props) => {
return (<p class="text-2xl font-light">{props.children}</p>)
return (<p class="text-xl font-light">{props.children}</p>)
}
export const TinyButton: ParentComponent<{ onClick: () => void }> = (props) => {
@@ -134,3 +135,17 @@ export const Indicator: ParentComponent = (props) => {
<div class="box-border animate-pulse px-2 py-1 -my-1 bg-white/70 rounded text-xs uppercase text-black">{props.children}</div>
)
}
export function Checkbox(props: { label: string, checked: boolean, onChange: (checked: boolean) => void }) {
return (
<KCheckbox.Root class="inline-flex items-center gap-2" checked={props.checked} onChange={props.onChange}>
<KCheckbox.Input class="" />
<KCheckbox.Control class="flex-0 w-8 h-8 rounded-lg border-2 border-white bg-neutral-800 ui-checked:bg-m-red">
<KCheckbox.Indicator>
<img src={check} class="w-8 h-8" alt="check" />
</KCheckbox.Indicator>
</KCheckbox.Control>
<KCheckbox.Label class="flex-1 text-xl font-light">{props.label}</KCheckbox.Label>
</KCheckbox.Root>
)
}