每个都有不同的用例吗?什么时候应该使用 withStyles 而不是 makeStyles?
如何更改 Material UI 工具提示的背景颜色和颜色。我尝试如下,但它不工作。
import { createMuiTheme } from '@material-ui/core/styles';
export const theme = createMuiTheme({
tooltip: {
color: '#ffffff',
rippleBackgroundColor: 'red'
}
});
import MuiThemeProvider from '@material-ui/core/styles/MuiThemeProvider';
import { theme } from "my-path";
<MuiThemeProvider theme={theme} >
<Tooltip
title={this.props.title}
placement={this.props.placement} className="customTooltipStyle">
<em className="fa fa-info-circle"></em>
</Tooltip>
</MuiThemeProvider>
Run Code Online (Sandbox Code Playgroud)