style: change select to radio group

This commit is contained in:
jialin
2024-10-09 14:08:27 +08:00
parent c041d768b2
commit 2b22481443
12 changed files with 118 additions and 66 deletions
+4 -2
View File
@@ -6,7 +6,7 @@ const Wrapper: React.FC<{
label?: string;
description?: React.ReactNode;
children: React.ReactNode;
}> = ({ children, label, description }) => {
}> = ({ children, label, description, ...rest }) => {
return (
<div className={styles['wrapper']}>
{label && (
@@ -14,7 +14,9 @@ const Wrapper: React.FC<{
<LabelInfo label={label} description={description}></LabelInfo>
</span>
)}
{children}
{React.isValidElement(children)
? React.cloneElement(children, { ...rest })
: children}
</div>
);
};