reactjs - 在 dropzone-material-ui 中更改段落样式

如何使用 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}                        
/>

最佳答案

我不认为你可以用 makeStyles 来设计它。

最好的方法是从检查器中获取 p 元素的类名并为其设置样式。它对我有用。

.MuiDropzoneArea-text {
        .....Your style here
}

如果需要,用"!important"标记样式。

https://stackoverflow.com/questions/58004293/

相关文章:

reactjs - 更新已编辑输入的值

html - 输入 DOM 元素字体大小小于预期,直到第一次单击页面

python - 如何在 seaborn python 中组合两个 relplots?

flutter - NestedScrollView with tabbarview scrolli

c# - Windows 后台打印驱动程序 - 状态请求发送不正确

matplotlib - plt.show() 后不显示绘图,未给出错误 'and only sho

python - 在单元测试中使用补丁模块时,自动完成 pycharm 不起作用

python - DRF 序列化程序字段重命名为其在验证数据中的源

terminal - 尝试启动 Virtual Box 时如何修复这些错误?

c# - 如何在 PuppeteerSharp 中设置下载行为?