-1
I created a component called "Searchbox":
const Input = styled.input`
border: 1px solid black;
width: 450px;
margin-right: ${props => props.marginRight == "ativo" ? '100px' : '0px'};
`;
I imported it in App.js and passed inside the tag "Searchbox" a property called "marginRight"
<SearchBox type="text" marginRight = "ativo" />
<SearchBox type="text" />
However, the margin-right is not occurring in either of the two inputs... even though I pass the "active" value in the marginRight property
Website: https://livraria-cactus.vercel.app/
Oops, speak Eonardo, can you give more detail of your code? why I ran an example here and it worked normal, yours gives some error?
– Maurício Silva
you created a component with the name Input and used Searchbox, remember that putting the minimum example makes total difference in the answer.
– novic
Hello guys, I appreciate your help, here it worked yes, sorry the delay to answer, I ran out of computer for a while... Thanks really
– Leonardo Siqueira