Directory page UI update
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
@ -133,4 +133,4 @@ const ListItem: React.FC<IListItem> = ({ className, label, hint, children, to, h
|
||||
);
|
||||
};
|
||||
|
||||
export { List as default, ListItem };
|
||||
export { List as default, type IListItem, ListItem };
|
||||
|
||||
@ -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 <List>{childrenWithProps}</List>;
|
||||
};
|
||||
|
||||
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<IRadioItem> = ({ label, hint, checked = false, onChange, value }) => (
|
||||
<ListItem label={label} hint={hint}>
|
||||
const RadioItem: React.FC<IRadioItem> = ({ label, hint, checked = false, onChange, value, ...props }) => (
|
||||
<ListItem label={label} hint={hint} {...props}>
|
||||
<input
|
||||
type='radio'
|
||||
checked={checked}
|
||||
|
||||
Reference in New Issue
Block a user