Working tree is now the canonical repo. Off-chain play-money + trustless on-chain (FPMM AMM + CLOB via UMA settlement), AI market factory, creator/social/distribution, mobile shell + push, one-command demo + deploy-kit. Secrets excluded (see ENV-AND-KEYS.md). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
29 lines
773 B
TypeScript
29 lines
773 B
TypeScript
import { Row } from 'web/components/layout/row'
|
|
import { Checkbox } from 'web/components/widgets/checkbox'
|
|
|
|
export const MultiCheckbox = (props: {
|
|
choices: { [key: string]: string }
|
|
selected: string[]
|
|
onChange: (selected: string[]) => void
|
|
}) => {
|
|
const { choices, selected, onChange } = props
|
|
return (
|
|
<Row className={'flex-wrap gap-3'}>
|
|
{Object.entries(choices).map(([key, value]) => (
|
|
<Checkbox
|
|
key={key}
|
|
label={key}
|
|
checked={selected.includes(value)}
|
|
toggle={(checked: boolean) => {
|
|
if (checked) {
|
|
onChange([...selected, value])
|
|
} else {
|
|
onChange(selected.filter((s) => s !== value))
|
|
}
|
|
}}
|
|
/>
|
|
))}
|
|
</Row>
|
|
)
|
|
}
|