✨ (theme) Add theme templates
Allows you to save your themes and select a theme from Typebot's gallery Closes #275
This commit is contained in:
@ -11,15 +11,18 @@ import { ReactNode } from 'react'
|
||||
|
||||
type Props<T extends string> = {
|
||||
options: (T | { value: T; label: ReactNode })[]
|
||||
defaultValue: T
|
||||
value?: T
|
||||
defaultValue?: T
|
||||
onSelect: (newValue: T) => void
|
||||
}
|
||||
export const RadioButtons = <T extends string>({
|
||||
options,
|
||||
value,
|
||||
defaultValue,
|
||||
onSelect,
|
||||
}: Props<T>) => {
|
||||
const { getRootProps, getRadioProps } = useRadioGroup({
|
||||
value,
|
||||
defaultValue,
|
||||
onChange: onSelect,
|
||||
})
|
||||
|
Reference in New Issue
Block a user