diff options
author | sowgro <tpoke.ferrari@gmail.com> | 2024-12-31 00:49:03 -0500 |
---|---|---|
committer | sowgro <tpoke.ferrari@gmail.com> | 2024-12-31 00:49:03 -0500 |
commit | 41814aa14040aa038c17ee0728532b0e341c5953 (patch) | |
tree | 78ae14228e888a18be5ad685a5277489e8fefc48 /extension/src/components/RadioButtonGroup.tsx | |
parent | 7cbba179124ed5a849f9d8c09fc61ec057810e13 (diff) | |
download | bookmarks-home-41814aa14040aa038c17ee0728532b0e341c5953.tar.gz bookmarks-home-41814aa14040aa038c17ee0728532b0e341c5953.tar.bz2 bookmarks-home-41814aa14040aa038c17ee0728532b0e341c5953.zip |
Refactor BMIcon
Diffstat (limited to '')
-rw-r--r-- | extension/src/components/RadioButtonGroup.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/extension/src/components/RadioButtonGroup.tsx b/extension/src/components/RadioButtonGroup.tsx index 297800d..ff5835d 100644 --- a/extension/src/components/RadioButtonGroup.tsx +++ b/extension/src/components/RadioButtonGroup.tsx @@ -1,4 +1,8 @@ import React, {ReactElement, useEffect, useId, useState} from "react"; +// +// function RadioEntry(props: {value: any, children: ReactElement}) { +// return props.children +// } /** * A component for a group of radio buttons where only one can be selected @@ -7,7 +11,7 @@ import React, {ReactElement, useEffect, useId, useState} from "react"; * @param props.value The option which is selected * @param props.onChange A function that will be called when the selected option changes */ -function RadioButtonGroup(props: { children: ReactElement<HTMLOptionElement>[], value: any, onChange?: (arg0: any) => void }) { +function RadioButtonGroup(props: { children: {props: {value: any, children: ReactElement}}[], value: any, onChange?: (arg0: any) => void }) { const [selected, setSelected] = useState(props.value); useEffect(() => { setSelected(props.value); @@ -18,7 +22,7 @@ function RadioButtonGroup(props: { children: ReactElement<HTMLOptionElement>[], return ( <div className="radio-group"> - { props.children.map((item) => ( + { props.children && props.children.map((item) => ( <label> <input type="radio" |