0
I’m using this component to use a mask input in my application, but I would like it to have the same style as my Input in my Styled-Components:
const Input = styled.TextInput`
paddingHorizontal: 20px;
paddingVertical: 15px;
borderRadius: 5px;
backgroundColor: #fff;
alignSelf: stretch;
marginBottom: 15px;
marginHorizontal: 20px;
fontSize: 16px;
`;
I tried something like:
const TextInputMask= styled.TextInputMask`
paddingHorizontal: 20px;
paddingVertical: 15px;
borderRadius: 5px;
backgroundColor: #fff;
alignSelf: stretch;
marginBottom: 15px;
marginHorizontal: 20px;
fontSize: 16px;
`;
But I get:
_styledComponents.dfault.Textinputmask is not a Function. Components.default.Textinputmask is Undefined
i could not understand well what is "Styled Component", but textinputmask accepts style as props, just vc put the styles you want and it will work
– Gabriel Belini
https://www.styled-components.com/
– veroneseComS