♻️(react) improve props propagation

Before we had to edit input components using Field when adding new props
to the latter.
This commit is contained in:
Nathan Vasse
2023-08-30 11:40:35 +02:00
committed by NathanVss
parent b530e966ae
commit 051c79fd6f
5 changed files with 16 additions and 84 deletions

View File

@@ -57,10 +57,6 @@ export interface SelectAuxProps extends SubProps {
export const SelectMonoAux = ({
children,
state = "default",
text,
textItems,
rightText,
fullWidth,
options,
name,
label,
@@ -72,6 +68,7 @@ export const SelectMonoAux = ({
disabled,
clearable = true,
onBlur,
...props
}: SelectAuxProps) => {
const { t } = useCunningham();
const labelProps = downshiftReturn.getLabelProps();
@@ -88,13 +85,7 @@ export const SelectMonoAux = ({
}, [value]);
return (
<Field
state={state}
text={text}
textItems={textItems}
rightText={rightText}
fullWidth={fullWidth}
>
<Field state={state} {...props}>
<div
className={classNames(
"c__select",