pass props only to input on InputControl
hom3mad3 opened this issue · 2 comments
hom3mad3 commented
I'm trying to pass in a background color to the input, how can I make sure only the input receives it? bg="white"
const inputProps = {
bg: "white"
};
<InputControl {...inputProps} />
thekaganugur commented
Hi,
You should actually pass it like this
InputControl name="firstName" label="First Name" inputProps={{bg: "red"}}/>
or like this
const inputProps = {
bg: "white"
};
InputControl name="firstName" label="First Name" inputProps={inputProps}/>
or maybe even this
const props = { inputProps : {
bg: "white"
} };
InputControl name="firstName" label="First Name" {...props}/>
But when I tried passing background or color props as I said, It didn't work. So I should check out why.
Will look into this tomorrow.
thekaganugur commented
Hello again,
You can check 1.4.6
, I updated devDependicies. If it is not working can you try to update your chakra-ui
dependencies.
Thanks.