Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[website] Fix code button with installation command #30622

Merged
merged 3 commits into from
Jan 17, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/public/static/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 12 additions & 3 deletions docs/src/components/home/GetStartedButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import ROUTES from 'docs/src/route';
import Link from 'docs/src/modules/components/Link';

export default function GetStartedButtons({
installation = 'npm install @mui/material',
installation = 'npm install @mui/material @emotion/react @emotion/styled',
to = ROUTES.documentation,
...props
}: { installation?: string; to?: string } & BoxProps) {
Expand Down Expand Up @@ -37,17 +37,26 @@ export default function GetStartedButtons({
size="large"
variant="contained"
endIcon={<KeyboardArrowRightRounded />}
sx={{ mr: { xs: 0, md: 2 }, mb: { xs: 2, md: 0 } }}
>
Get started
</Button>
<Box sx={{ width: 16, height: 16 }} />
<Button
size="large"
// @ts-expect-error
variant="code"
startIcon="$"
endIcon={copied ? <CheckRounded color="primary" /> : <ContentCopyRounded />}
onClick={handleCopy}
sx={{
maxWidth: '324px',
display: 'inline-block',
justifyContent: 'start',
overflowX: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
position: 'relative',
pr: 5,
}}
>
{installation}
</Button>
Expand Down
6 changes: 3 additions & 3 deletions docs/src/icons/SvgMuiLogo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ export default function SvgMuiLogo(props: RootSvgProps) {
return (
<RootSvg
xmlns="http://www.w3.org/2000/svg"
width={36}
width={35}
height={32}
viewBox="0 0 36 32"
viewBox="0 0 35 32"
fill="none"
{...props}
>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M30.343 21.976a1 1 0 00.502-.864l.018-5.787a1 1 0 01.502-.864l3.137-1.802a1 1 0 011.498.867v10.521a1 1 0 01-.502.867l-11.839 6.8a1 1 0 01-.994.001l-9.291-5.314a1 1 0 01-.504-.868v-5.305c0-.006.007-.01.013-.007.005.003.012 0 .012-.007v-.006c0-.004.002-.008.006-.01l7.652-4.396c.007-.004.004-.015-.004-.015a.008.008 0 01-.008-.008l.015-5.201a1 1 0 00-1.5-.87l-5.687 3.277a1 1 0 01-.998 0L6.666 9.7a1 1 0 00-1.499.866v9.4a1 1 0 01-1.496.869l-3.166-1.81a1 1 0 01-.504-.87l.028-16.43A1 1 0 011.527.86l10.845 6.229a1 1 0 00.996 0L24.21.86a1 1 0 011.498.868v16.434a1 1 0 01-.501.867l-5.678 3.27a1 1 0 00.004 1.735l3.132 1.783a1 1 0 00.993-.002l6.685-3.839zM31 7.234a1 1 0 001.514.857l3-1.8A1 1 0 0036 5.434V1.766A1 1 0 0034.486.91l-3 1.8a1 1 0 00-.486.857v3.668z"
d="M10.992 6.412 1.504.877A1 1 0 0 0 0 1.741v15.627a2 2 0 0 0 .971 1.715l2.514 1.508A1 1 0 0 0 5 19.734v-9.01a1 1 0 0 1 1.496-.87l4.512 2.579a2 2 0 0 0 1.984 0l4.512-2.578a1 1 0 0 1 1.496.868v4.116a2 2 0 0 1-1.008 1.737l-5.236 2.992A1.5 1.5 0 0 0 12 20.87v4.06a2 2 0 0 0 .89 1.664l7.081 4.72a2 2 0 0 0 2.102.073l12.171-6.955A1.5 1.5 0 0 0 35 23.13V12.265a1 1 0 0 0-1.514-.857l-2.515 1.508A2 2 0 0 0 30 14.632v5.485a1.5 1.5 0 0 1-.771 1.312l-7.43 4.127a1.5 1.5 0 0 1-1.56-.063l-2.424-1.616a1 1 0 0 1 .04-1.69l5.174-3.104A2 2 0 0 0 24 17.368V1.74a1 1 0 0 0-1.504-.864l-9.488 5.535a2 2 0 0 1-2.016 0Z M34.029 7.583 31.514 9.09A1 1 0 0 1 30 8.234V4.132a2 2 0 0 1 .971-1.715L33.486.91A1 1 0 0 1 35 1.766v4.102a2 2 0 0 1-.971 1.715Z"
fill="#007FFF"
/>
</RootSvg>
Expand Down
4 changes: 4 additions & 0 deletions docs/src/modules/brandingTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,10 @@ export function getThemedComponents(theme: Theme) {
color: theme.palette.grey[400],
},
'& .MuiButton-endIcon': {
display: 'inline-block',
position: 'absolute',
right: 0,
marginRight: 10,
color:
theme.palette.mode === 'dark' ? theme.palette.grey[400] : theme.palette.grey[700],
},
Expand Down
2 changes: 1 addition & 1 deletion docs/src/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const ROUTES = {
components: '/getting-started/supported-components/',
customization: '/customization/how-to-customize/',
theming: '/customization/theming/',
documentation: '/getting-started/usage/',
documentation: '/getting-started/installation/',
communityHelp: '/getting-started/support/#community-help-free',
blog: 'https://medium.com/material-ui',
showcase: '/discover-more/showcase',
Expand Down