From 9edc38971908541ea7c25ffe73f48aa372635632 Mon Sep 17 00:00:00 2001 From: Milli Date: Wed, 25 May 2022 20:45:02 +0200 Subject: [PATCH] Expanded ChoicesToggleGroup for string choices --- web/components/choices-toggle-group.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/components/choices-toggle-group.tsx b/web/components/choices-toggle-group.tsx index 4e23dfdc..d56eabbc 100644 --- a/web/components/choices-toggle-group.tsx +++ b/web/components/choices-toggle-group.tsx @@ -2,9 +2,9 @@ import { Row } from './layout/row' import clsx from 'clsx' export function ChoicesToggleGroup(props: { - currentChoice: number - setChoice: (p: number) => void - choices: number[] + currentChoice: number | string + setChoice: (p: any) => void //number | string does not work here because of SetStateAction in .tsx + choices: number[] | string[] titles: string[] isSubmitting?: boolean }) { @@ -18,7 +18,7 @@ export function ChoicesToggleGroup(props: { {choices.map((choice, i) => { return (