Change root background color with Material-UI theme

CssBaseline is the component that controls this aspect. If you aren’t using CssBaseline, then you are just seeing the default provided by the browser. Here is a working v4 example (v5 example further down): import React from “react”; import ReactDOM from “react-dom”; import CssBaseline from “@material-ui/core/CssBaseline”; import { MuiThemeProvider, createMuiTheme } from “@material-ui/core/styles”; import Button … Read more

Dialog width material-ui next

Add two props fullWidth and maxWidth=”md” in your Dialog component like this : <Dialog {…your_other_props} fullWidth maxWidth=”sm” > {/* Your dialog content */} </Dialog> You can change md to sm, xs, lg and xl as per your requirement.

How to use useStyle to style Class Component in Material Ui

You can do it like this: import { withStyles } from “@material-ui/core/styles”; const styles = theme => ({ root: { backgroundColor: “red” } }); class ClassComponent extends Component { state = { searchNodes: “” }; render() { const { classes } = this.props; return ( <div className={classes.root}>Hello!</div> ); } } export default withStyles(styles, { withTheme: … Read more

MUI – Styling text inside ListItemText

I beleive the only way to achieve this right now is to use the ‘disableTypography’ prop of the ListItemText element. <ListItemText disableTypography primary={<Typography variant=”body2″ style={{ color: ‘#FFFFFF’ }}>MyTitle</Typography>} /> This lets you embed your own text element with whatever styling you want on it.

How to make a Material UI react Button act as a react-router-dom Link?

Okay, this is very easy, I don’t know why it was not working with me: Just do like this: import Button from ‘@material-ui/core/Button’; import { Link } from ‘react-router-dom’; <Button component={Link} to=”/about” variant=”contained” color=”primary”> About Page </Button> You can find more details at https://mui.com/material-ui/guides/routing/.

Text Area in material-ui

To make TextField work like a textarea you can use multiline prop. You can read more about TextFied and its props here. Example <TextField placeholder=”MultiLine with rows: 2 and rowsMax: 4″ multiline rows={2} maxRows={4} /> You can set maxRows={Infinity} if you want to scale your multiline input box with your content (regardless of the content … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)