A
A
Artem Rassadin2021-11-29 16:32:56
React
Artem Rassadin, 2021-11-29 16:32:56

Why are styles not being applied to the button in material ui?

Good afternoon! Today I started to study material ui and already have a question. I took all the code that will be below from the documentation, changed it slightly.

const useStyles = makeStyles({
    root: {
        color: '#fff',
        backgroundColor: "#000",
        border: 0,
        borderRadius: 3,
        height: 48,
        padding: '0 30px',
    },
});

export default function Weather(props) {
    const classes = useStyles(props);

    return (<Button className={classes.root}>weather</Button>);
}


A lot of things are written in styles, but not all of them are displayed in the browser. Here's what happens: 61a4d677bb386031440098.png
What could be the problem?

PS I found the problem. The fact is that the styles of the material ui itself interrupt my styles. How can this be fixed?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question