material-ui-dropzone
material-ui-dropzone copied to clipboard
It doesn't work with styled components
Bug Report
Describe the bug
It doesn't work with styled components. Simply no styling takes effect. I'm guessing it's because the className property passed to the component is not properly passed to the internal components.
Steps to reproduce
Do something like the code below
import styled from 'styled-components';
import { DropzoneArea as MuiDropZone } from 'material-ui-dropzone';
export const DropZoneArea = styled(MuiDropZone)`
height: 100px;
&.MuiDropzoneArea-textContainer{
color: red;
}
`;
You'll see that none of the styles are applied.
Expected behavior
Styles should be applied when using styled components.
Versions
- OS: Ubuntu
- Browser: Chrome
-
@material-ui/core
version: 4.11.4 -
material-ui-dropzone
version: 3.5.0 -
styled-components
version: 5.3.0
Use dropzoneClass prop to apply your styles. Example: <DropzoneArea dropzoneClass = classes.dropzone />
This works fine.