user16352740
user16352740

Reputation:

how to remove an style from material ui component

I know its possible to use "sx" prop or createTheme() function to override an style in material ui component. but is there any way to remove any of default styles from its components?

enter image description here

Upvotes: 3

Views: 1996

Answers (1)

Dobromir Kirov
Dobromir Kirov

Reputation: 1033

Yes, you can use genereic css property.

all: "initial"

<Button sx={{ all: "initial" }}>Click me</Button>

<Button style={{ all: "initial" }}>Click me</Button>

When you use it its going to reset the stylisation of the component and after it you can write your own.

Upvotes: 3

Related Questions