【发布时间】:2020-01-13 01:28:40
【问题描述】:
我正在尝试使用 Material 提供的 CircularProgress。
我创建这个组件是为了改变它的颜色:
import React, { Component } from 'react';
import { withStyles } from '@material-ui/core/styles';
import { CircularProgress } from '@material-ui/core';
class ColoredCircularProgress extends Component {
render() {
const { classes } = this.props;
return <CircularProgress {...this.props} classes={{colorPrimary: classes.colorPrimary}}/>;
}
}
const styles = props => ({
colorPrimary: {
backgroundColor: '#FD8907',
}
});
export default withStyles(styles)(ColoredCircularProgress);
但是在我的网站上是这样的:
我的问题是:
我希望圆圈看起来是橙色的,而圆圈看起来仍然是蓝色的,并且它在后面添加了一个橙色的方形框。
它也显示在我网站的左上角。我怎样才能把它放在中间?
【问题讨论】:
标签: javascript reactjs material-ui