fix: radio and list sort init

This commit is contained in:
Ibrahima G. Coulibaly
2024-06-27 20:27:03 +01:00
parent 8650703266
commit a6eb5d59e9
11 changed files with 180 additions and 79 deletions

View File

@@ -3,34 +3,31 @@ import React from 'react';
import TextFieldWithDesc from './TextFieldWithDesc';
import SimpleRadio from './SimpleRadio';
const RadioWithTextField = <T,>({
fieldName,
radioValue,
const RadioWithTextField = ({
title,
onRadioChange,
onRadioClick,
checked,
value,
description,
onTextChange,
typeDescription
radioDescription
}: {
fieldName: string;
title: string;
radioValue: T;
onRadioChange: (val: T) => void;
checked: boolean;
onRadioClick: () => void;
value: string;
description: string;
onTextChange: (value: string) => void;
typeDescription?: string;
radioDescription?: string;
}) => {
const onChange = () => onRadioChange(radioValue);
return (
<Box>
<SimpleRadio
value={radioValue}
onChange={onChange}
fieldName={fieldName}
checked={checked}
onClick={onRadioClick}
title={title}
description={typeDescription}
description={radioDescription}
/>
<TextFieldWithDesc
value={value}