Some checks failed
No response / noResponse (push) Has been cancelled
CI / Continuous releases (push) Has been cancelled
CI / test-dev (macos-latest) (push) Has been cancelled
CI / test-dev (ubuntu-latest) (push) Has been cancelled
CI / test-dev (windows-latest) (push) Has been cancelled
Maintenance / main (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
90 lines
2.4 KiB
TypeScript
90 lines
2.4 KiB
TypeScript
import * as React from 'react';
|
|
import Typography from '@mui/material/Typography';
|
|
import { Theme } from '@mui/material/styles';
|
|
import { Link } from '@mui/docs/Link';
|
|
import ROUTES from 'docs/src/route';
|
|
import FEATURE_TOGGLE from 'docs/src/featureToggle';
|
|
|
|
const linkStyleOverrides = (theme: Theme) => ({
|
|
color: 'inherit',
|
|
textDecorationColor: 'currentColor',
|
|
'&:hover': {
|
|
color: (theme.vars || theme).palette.primary[200],
|
|
},
|
|
...theme.applyDarkStyles({
|
|
color: 'inherit',
|
|
'&:hover': {
|
|
color: (theme.vars || theme).palette.primary[200],
|
|
},
|
|
}),
|
|
});
|
|
|
|
function getSurveyMessage() {
|
|
return (
|
|
<React.Fragment>
|
|
{`🚀 Influence MUI's 2025 roadmap! Participate in the latest`}
|
|
|
|
<Link
|
|
href="https://tally.so/r/mObbvk?source=website"
|
|
target="_blank"
|
|
underline="always"
|
|
sx={linkStyleOverrides}
|
|
>
|
|
Developer Survey →
|
|
</Link>
|
|
</React.Fragment>
|
|
);
|
|
}
|
|
|
|
function getDefaultHiringMessage() {
|
|
return (
|
|
<React.Fragment>
|
|
🚀  We're hiring a Designer, Full-stack Engineer, React Community Engineer, and
|
|
more!  
|
|
<Link
|
|
// Fix me!
|
|
href={ROUTES.careers}
|
|
target="_blank"
|
|
underline="always"
|
|
sx={linkStyleOverrides}
|
|
>
|
|
Check the careers page →
|
|
</Link>
|
|
</React.Fragment>
|
|
);
|
|
}
|
|
|
|
export default function AppHeaderBanner() {
|
|
const showSurveyMessage = false;
|
|
const bannerMessage = showSurveyMessage ? getSurveyMessage() : getDefaultHiringMessage();
|
|
|
|
return FEATURE_TOGGLE.enable_website_banner ? (
|
|
<Typography
|
|
sx={[
|
|
{
|
|
fontWeight: 'medium',
|
|
},
|
|
(theme) => ({
|
|
color: '#fff',
|
|
p: '12px',
|
|
display: 'flex',
|
|
flexDirection: { xs: 'column', md: 'row' },
|
|
alignItems: { xs: 'start', sm: 'center' },
|
|
justifyContent: 'center',
|
|
fontSize: theme.typography.pxToRem(13),
|
|
background: `linear-gradient(-90deg, ${(theme.vars || theme).palette.primary[700]}, ${
|
|
(theme.vars || theme).palette.primary[500]
|
|
} 120%)`,
|
|
...theme.applyDarkStyles({
|
|
background: `linear-gradient(90deg, ${(theme.vars || theme).palette.primary[900]}, ${
|
|
(theme.vars || theme).palette.primary[600]
|
|
} 120%)`,
|
|
}),
|
|
}),
|
|
]}
|
|
>
|
|
{bannerMessage}
|
|
</Typography>
|
|
) : null;
|
|
}
|