Giovanni Cassanelli
Giovanni Cassanelli

Reputation: 41

How do I change the weight and color of the border of the Material UI Dialog?

Hello I am trying to add an external frame to the Dialog Box from Material UI. I was trying to do this but nothing happened:

overrides: {
  MuiDialog :{
    paper : { 
      borderWidth : 10,
      borderRadius: 10,
      borderColor : "#FFFFFF",
      backgroundColor : "#101010"
    }
}, .......

Do you know a way to do by using overrides in the MUI theme?

Thanks

Upvotes: 2

Views: 2201

Answers (1)

Ryan Cogswell
Ryan Cogswell

Reputation: 81156

The main issue I see is that you aren't setting border-style. The following works:

const theme = createMuiTheme({
  overrides: {
    MuiDialog: {
      paper: {
        borderWidth: 10,
        borderRadius: 10,
        borderColor: "#fff",
        borderStyle: "solid",
        backgroundColor: "#101010",
        color: "#fff"
      }
    }
  }
});

Edit Material demo

Upvotes: 1

Related Questions