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

[docs] Link docs from component demos on Toolpad Core landing page #4013

Merged
merged 6 commits into from
Sep 5, 2024
Merged
Changes from 5 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
15 changes: 15 additions & 0 deletions docs/src/components/landing/ToolpadFeaturesSwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import dynamic from 'next/dynamic';
import Box from '@mui/material/Box';
import Stack from '@mui/material/Stack';
import Typography from '@mui/material/Typography';
import { Link } from '@mui/docs/Link';
import AutoAwesomeMosaic from '@mui/icons-material/AutoAwesomeMosaic';
import KeyboardArrowRightRounded from '@mui/icons-material/KeyboardArrowRightRounded';
import AutoAwesomeMotion from '@mui/icons-material/AutoAwesomeMotion';
import NotificationsIcon from '@mui/icons-material/Notifications';
import LockOpenIcon from '@mui/icons-material/LockOpen';
Expand All @@ -16,11 +18,13 @@ function ComponentItem({
icon,
name,
description,
link,
}: {
// label: string;
icon: React.ReactNode;
name: React.ReactNode;
description?: React.ReactNode;
link?: React.ReactNode;
}) {
return (
<Box
Expand Down Expand Up @@ -57,6 +61,12 @@ function ComponentItem({
{description}
</Typography>
)}
{link && (
<Link href={link.toString()} underline="hover" variant="body2" target="_blank">
prakhargupta1 marked this conversation as resolved.
Show resolved Hide resolved
View the docs
<KeyboardArrowRightRounded fontSize="small" />
</Link>
)}
</div>
</Box>
);
Expand All @@ -70,6 +80,7 @@ const componentElement = new Map([
description:
'The Layout component provides a standard structure for functional apps, including customizable nav bar, header bar and more.',
icon: <AutoAwesomeMosaic />,
link: '/toolpad/core/react-dashboard-layout/',
},
],
[
Expand All @@ -79,6 +90,7 @@ const componentElement = new Map([
description:
'Our authentication components help you set up complex authentication flows quickly, without subscription costs.',
icon: <LockOpenIcon />,
link: '/toolpad/core/react-sign-in-page/',
},
],
[
Expand All @@ -87,6 +99,7 @@ const componentElement = new Map([
name: 'Page container',
description: 'Sets up breadcrumbs, title, toolbar and a responsive container for your pages.',
icon: <AutoAwesomeMotion />,
link: '/toolpad/core/react-page-container/',
},
],
[
Expand All @@ -96,6 +109,7 @@ const componentElement = new Map([
description:
'Toolpad Core exports an imperative API to manage dialogs in your application. System dialogs that adapt to your application theme are also included.',
icon: <NotificationsIcon />,
link: '/toolpad/core/react-use-dialogs/',
},
],
[
Expand All @@ -105,6 +119,7 @@ const componentElement = new Map([
description:
'We offer imperative APIs to deal with snackbars an notifications around your application.',
icon: <NotificationsIcon />,
link: '/toolpad/core/react-use-notifications/',
},
],
]);
Expand Down
Loading