change props children in input
This commit is contained in:
parent
f082308d5d
commit
b46be19a22
|
|
@ -25,8 +25,9 @@ export default function Input(
|
|||
}
|
||||
) {
|
||||
/*name, id*/
|
||||
let { children, ...otherProps } = props;
|
||||
|
||||
const [field, meta, helpers] = useField(props);
|
||||
const [field, meta, helpers] = useField(otherProps);
|
||||
|
||||
return (
|
||||
<div css={[props.title && tw`my-1`, tw`relative`]} className={props.className}>
|
||||
|
|
@ -43,7 +44,7 @@ export default function Input(
|
|||
{/*name={name || title} id={id || name || title}*/}
|
||||
<input
|
||||
id={props.id ?? props.name ?? props.title}
|
||||
{...props}
|
||||
{...otherProps}
|
||||
{...field}
|
||||
tw="bg-primary appearance-none border-2 border-secondary rounded w-full py-2 px-4 text-primary leading-tight focus:outline-none focus:bg-secondary focus:border-accent transition duration-150 "
|
||||
/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user