Skip to content

Commit

Permalink
remove unnecessary margin prop from the logo component
Browse files Browse the repository at this point in the history
  • Loading branch information
danilo-leal committed May 30, 2024
1 parent afe18d4 commit dbe3e6a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions docs/src/components/action/LogoWithCopyMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,21 @@ import TextFieldsRoundedIcon from '@mui/icons-material/TextFieldsRounded';
import CheckCircleRoundedIcon from '@mui/icons-material/CheckCircleRounded';
import { RootSvgProps } from 'docs/src/icons/RootSvg';
import SvgMuiLogomark, {
MuiSvgLogoString,
MuiSvgWordmarkString,
muiSvgLogoString,
muiSvgWordmarkString,
} from 'docs/src/icons/SvgMuiLogomark';

interface LogoWithCopyMenuProps {
logo?: React.ComponentType<RootSvgProps>;
logoSvgString?: string;
wordmarkSvgString?: string;
marginLeft?: boolean;
smallerMargin?: boolean;
}

export default function LogoWithCopyMenu({
logo: LogoSvg = SvgMuiLogomark,
logoSvgString = MuiSvgLogoString,
wordmarkSvgString = MuiSvgWordmarkString,
smallerMargin,
logoSvgString = muiSvgLogoString,
wordmarkSvgString = muiSvgWordmarkString,
marginLeft,
}: LogoWithCopyMenuProps) {
const [contextMenu, setContextMenu] = React.useState<{
Expand Down Expand Up @@ -69,7 +67,7 @@ export default function LogoWithCopyMenu({
onContextMenu={handleContextMenu}
sx={{
cursor: 'default',
mr: smallerMargin ? 1 : 1.5,
mr: 1,
ml: marginLeft ? 1.5 : undefined,
'& > svg': { m: '0 !important' }, // override the 2px margin-left coming from the Link component
}}
Expand Down

0 comments on commit dbe3e6a

Please sign in to comment.