-
Notifications
You must be signed in to change notification settings - Fork 247
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
Example of how to use the theme overrides #172
Comments
For overriding the themes in a general sense this is how I do it, I have a js file called muiTheme.js
this is then passed into your app, perhaps in the app.js if you app looks like this import React from 'react'
import { MuiThemeProvider } from '@material-ui/core'
import theme from './muiTheme' // heres your file! 😀
export default function App() {
return (
<MuiThemeProvider theme={theme}>
<Rest>
<Of>
<Your>
<Site>
</Site>
</Your>
</Of>
</Rest>
</MuiThemeProvider>
)
} and then in your muiTheme file you see how I have overriden some in the code snippet above, you should be able to customize some of the classes like this
Again this is just my guess based on a few assumptions, I haven't actually tried this myself with material-ui-dropzone yet, but If I was going to try customising them via the themehow I would start |
@max-carroll the |
Oh right, I'm not sure in that case, hopefully someone else can help you with this |
If overriding the theme in Mui doesn't work you could try to pass in classes into the Dropzone like <Dropzone
classes={{ root: classes.root, textContainer: classes.container}} there is a theming.md in the source code you can look at with a list of classes you can use |
There seems to be no
|
Oh right, perhaps we need to look into that then, at the moment I know the classes prop is being fed in from a higher order component, we would need to ensure that if classes are passes in as a prop that these take president. As a work around until this has been done you could make use of the classes props as indicated here |
Hi @amirmishani , Thanks for your feedback, the actual error was the missing typing for the |
This issue is not yet fixed for TypeScript, that is, I can't reference |
This is because MUI doesn't know about the existence of MuiDropzoneArea so it can't provide typing information. See #260 for a method to extend the types. |
How do you do use the Mui theme overrides? Can you please provide an example? Thank you.
The text was updated successfully, but these errors were encountered: