【发布时间】:2019-09-19 05:34:09
【问题描述】:
如何使用 makeStyles 改变 material-ui-dropzone 组件的样式?
我的 useStyle 是:
const useStyles = makeStyles(theme => ({
DropzoneArea: {
fontWeight: 10,
margin:0,
padding:0
}
}
and in app.js i use this:
<DropzoneArea
acceptedFiles={['image/*']}
maxFileSize={10000000}
filesLimit={1}
dropzoneClass={classes.DropzoneArea}
/>
【问题讨论】:
-
基于对 Dropzone 文档和 src 的第一印象,我希望您必须将其应用于 dropzone 组件。当这个呈现时,你在 html 中看到你的类名吗? (我没有将 src 一直跟踪到 react-dropzone 中的输出;我假设道具被传递下来。)
-
不,没有:(
-
这个库没有提供这样做的好方法。它们只为您提供设置容器样式的方法,但您无法从那里设置文本样式。
标签: reactjs material-ui