Skip to content

Commit

Permalink
[Popover] Add ownerState on the paper slot (mui#34445)
Browse files Browse the repository at this point in the history
  • Loading branch information
bharatkashyap authored and Daniel Rabe committed Nov 29, 2022
1 parent 44035dc commit 3b76c56
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 42 deletions.
29 changes: 18 additions & 11 deletions docs/src/components/header/HeaderNavDropdown.tsx
Expand Up @@ -109,16 +109,12 @@ const DOCS = [
description: 'Advanced and powerful components for complex use cases.',
href: ROUTES.advancedComponents,
},
// @ts-ignore
...(process.env.DEPLOY_ENV === 'production'
? []
: [
{
name: 'MUI Toolpad',
description: 'Low-code admin builder.',
href: ROUTES.toolpadDocs,
},
]),
{
name: 'MUI Toolpad',
description: 'Low-code admin builder.',
href: ROUTES.toolpadDocs,
chip: 'Alpha',
},
];

export default function HeaderNavDropdown() {
Expand Down Expand Up @@ -265,7 +261,18 @@ export default function HeaderNavDropdown() {
noLinkStyle
sx={{ flexDirection: 'column', alignItems: 'initial' }}
>
{item.name}
<Box
sx={{
display: 'flex',
flexDirection: 'row',
justifyContent: 'space-between',
}}
>
{item.name}
{item.chip ? (
<Chip size="small" label={item.chip} color="grey" />
) : null}
</Box>
<Typography variant="body2" color="text.secondary">
{item.description}
</Typography>
Expand Down
59 changes: 28 additions & 31 deletions docs/src/modules/components/MuiProductSelector.tsx
Expand Up @@ -162,38 +162,35 @@ export default function MuiProductSelector() {
/>
</Link>
</li>
{/* @ts-ignore */}
{process.env.DEPLOY_ENV === 'production' ? null : (
<li role="none">
<Link
href={ROUTES.toolpadDocs}
sx={{
p: 2,
pr: 3,
borderBottom: '1px solid',
borderColor: (theme) =>
<li role="none">
<Link
href={ROUTES.toolpadDocs}
sx={{
p: 2,
pr: 3,
borderBottom: '1px solid',
borderColor: (theme) =>
theme.palette.mode === 'dark'
? alpha(theme.palette.primary[100], 0.08)
: theme.palette.grey[100],
width: '100%',
'&:hover': {
backgroundColor: (theme) =>
theme.palette.mode === 'dark'
? alpha(theme.palette.primary[100], 0.08)
: theme.palette.grey[100],
width: '100%',
'&:hover': {
backgroundColor: (theme) =>
theme.palette.mode === 'dark'
? alpha(theme.palette.primaryDark[700], 0.4)
: theme.palette.grey[50],
},
}}
>
<ProductSubMenu
role="menuitem"
icon={<IconImage name="product-toolpad" />}
name="MUI Toolpad"
description="Low-code admin builder."
chip={<Chip size="small" label="Alpha" color="grey" />}
/>
</Link>
</li>
)}
? alpha(theme.palette.primaryDark[700], 0.4)
: theme.palette.grey[50],
},
}}
>
<ProductSubMenu
role="menuitem"
icon={<IconImage name="product-toolpad" />}
name="MUI Toolpad"
description="Low-code admin builder."
chip={<Chip size="small" label="Alpha" color="grey" />}
/>
</Link>
</li>
</React.Fragment>
);
}

0 comments on commit 3b76c56

Please sign in to comment.