From b88ddaf917812967d8e08df2d6604a42d1b25194 Mon Sep 17 00:00:00 2001 From: Robin Wijnant Date: Sat, 6 Jun 2020 17:27:38 +0200 Subject: [PATCH] fix(radio): make selected value optional --- src/components/Radio/RadioGroup/RadioGroup.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Radio/RadioGroup/RadioGroup.tsx b/src/components/Radio/RadioGroup/RadioGroup.tsx index 2bcbe54a..0cb2f5f5 100644 --- a/src/components/Radio/RadioGroup/RadioGroup.tsx +++ b/src/components/Radio/RadioGroup/RadioGroup.tsx @@ -5,14 +5,14 @@ import styles from '../../../css-reset.module.css'; export interface RadioContext { onChange: (e: React.ChangeEvent) => void; - selectedValue: string; + selectedValue?: string; groupRef?: React.Ref; name: string; } export interface Props { children: React.ReactNode; - defaultValue: RadioContext['selectedValue']; + defaultValue?: RadioContext['selectedValue']; name: string; onChange?: (e: React.ChangeEvent) => void; groupRef?: React.Ref;