summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-07-22 18:54:56 +0200
committerThomas F. K. Jorna <[email protected]>2021-07-22 18:54:56 +0200
commite81659da02679735615f667750e0c3377483f093 (patch)
tree87ced8f3f141fbd7867016309ea28710b288a732
parenta71be5204800100917034f49d14243010b3f648c (diff)
fixed dumb type mixup
-rw-r--r--pages/index.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/pages/index.tsx b/pages/index.tsx
index ff0537f..522b047 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -258,8 +258,8 @@ export const SliderWithInfo = ({
export interface EnableSectionProps {
label: string
- value: () => void
- onChange: string
+ value: boolean | number
+ onChange: () => void
infoText?: string
children: React.ReactNode
}
@@ -273,7 +273,7 @@ export const EnableSection = (props: EnableSectionProps) => {
<Text>{label}</Text>
{infoText && <InfoTooltip infoText={infoText} />}
</Box>
- <Switch isChecked={value} onChange={onChange} />
+ <Switch isChecked={!!value} onChange={onChange} />
</Box>
{value && children}
</Box>