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
Is there a way to customize font-size and line-height? #44
Comments
@czelusniakdawid You can do so by overriding classes. see material-ui docs for more info. example: https://codesandbox.io/s/3qr4owqnmq const styles = {
base: {
fontSize: 33,
},
};
const App = ({ classes }) => (
<SnackbarProvider
maxSnack={3}
classes={{
base: classes.base,
}}
>
<MessageButtons />
</SnackbarProvider>
); |
Is there a way to do this on the Something like:
|
@elitan Classes prop only accepts string values (i.e. name of the class) and not objects. |
I am not sure how that relates to my question. |
Meaning that value for the key <SnackbarProvider
maxSnack={3}
classes={{
base: { fontSize: 33 } // <-- object ❌
base: 'name-of-the-class' // <-- string ✅
}}
> code example: https://codesandbox.io/s/2014qr4vvn |
Hi @iamhosseindhv!
Great job! I use notistack quite often but I have a question. How can I customize
font-size
andline-height
properties onSnackbarItem
component? It seems like they are hardcoded:https://github.com/iamhosseindhv/notistack/blob/master/src/SnackbarItem/SnackbarItem.styles.js#L10
Thanks in advance!
The text was updated successfully, but these errors were encountered: