-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to change or override default styles #4
Comments
@muhammadtalha-13
Inspect the element and see if the styles are being reflected. |
@muhammadtalha-13 Did it work? |
Yes it totally worked @arunghosh . Thank you for your immediate help. In the GitHub README and on the npmjs page, it was written like this: .pincode-input-container } Writing it like the way you said worked. Maybe change the info in the README and the npmjs page? |
The README was referring to scss. But I think you are using css. I will make the required update. |
For anyone in the future - if you want to reset the styling completely and use your own styles applied via classes you can use this code: const LIBRARY_INPUT_STYLE_RESET = {
padding: undefined,
margin: undefined,
textAlign: undefined,
border: undefined,
background: undefined,
width: undefined,
height: undefined,
}
const LIBRARY_FOCUS_INPUT_STYLE_RESET = {
outline: undefined,
boxShadow: undefined,
}
...
const MyCodeInput = (props) => {
return <ReactCodeInput
{...props}
inputStyle={LIBRARY_INPUT_STYLE_RESET}
inputFocusStyle={LIBRARY_FOCUS_INPUT_STYLE_RESET}
/>
} This way you don't have to use |
Hello.
Like the title says, I am unable to style the boxes. Overriding the default styles in a new .scss file does not work. Neither does the CSS in JSX method works. Even doing 'display: none' on the component has no effect whatsoever.
Kindly guide me on how to do it. Thank you.
The text was updated successfully, but these errors were encountered: