import * as React from 'react';
import { styled } from '@mui/system';
const MyComponent = styled('div')({
color: 'darkslategray',
backgroundColor: 'aliceblue',
padding: 8,
borderRadius: 4,
});
export default function BasicUsage() {
return <MyComponent>Styled div</MyComponent>;
}
So you know mui styled function or whatevevr like above. Can you do it but instead of being a styled div it would instead be a styled mui component. I do not want to use makestyles or sx props if possible.
e.g
import * as React from 'react';
import { styled } from '@mui/system';
import Avatar from "@mui/material/Avatar";
const MyComponent = styled('Avatar')({
color: 'darkslategray',
backgroundColor: 'aliceblue',
padding: 8,
borderRadius: 4,
});
export default function BasicUsage() {
return <MyComponent>Styled div</MyComponent>;
}