diff --git a/src/components/list.tsx b/src/components/list.tsx index a64f19450..4d5934d26 100644 --- a/src/components/list.tsx +++ b/src/components/list.tsx @@ -133,4 +133,4 @@ const ListItem: React.FC = ({ className, label, hint, children, to, h ); }; -export { List as default, ListItem }; +export { List as default, type IListItem, ListItem }; diff --git a/src/components/radio.tsx b/src/components/radio.tsx index 384994eba..e00d3c30f 100644 --- a/src/components/radio.tsx +++ b/src/components/radio.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import List, { ListItem } from './list'; +import List, { type IListItem, ListItem } from './list'; interface IRadioGroup { onChange: React.ChangeEventHandler; @@ -15,7 +15,7 @@ const RadioGroup = ({ onChange, children }: IRadioGroup) => { return {childrenWithProps}; }; -interface IRadioItem { +interface IRadioItem extends IListItem { label: React.ReactNode; hint?: React.ReactNode; value: string; @@ -23,8 +23,8 @@ interface IRadioItem { onChange?: React.ChangeEventHandler; } -const RadioItem: React.FC = ({ label, hint, checked = false, onChange, value }) => ( - +const RadioItem: React.FC = ({ label, hint, checked = false, onChange, value, ...props }) => ( + { return ( -
-
- - - -
- - - -
- - -
-
-
+
+ + } /> + + + + + + {features.federating && ( -
- - - -
- - - -
- - -
-
-
+ + } /> + + + + + + )}