@@ -368,10 +281,6 @@ export default function Checkout() {
-
);
}
diff --git a/docs/data/material/getting-started/templates/checkout/NavBar.js b/docs/data/material/getting-started/templates/checkout/NavBar.js
new file mode 100644
index 00000000000000..445851e2c715f1
--- /dev/null
+++ b/docs/data/material/getting-started/templates/checkout/NavBar.js
@@ -0,0 +1,100 @@
+import * as React from 'react';
+import PropTypes from 'prop-types';
+import { createTheme, ThemeProvider, styled } from '@mui/material/styles';
+import Select from '@mui/material/Select';
+import MenuItem from '@mui/material/MenuItem';
+import FormControl from '@mui/material/FormControl';
+import Button from '@mui/material/Button';
+import IconButton from '@mui/material/IconButton';
+import Box from '@mui/material/Box';
+import AppBar from '@mui/material/AppBar';
+import Toolbar from '@mui/material/Toolbar';
+import Container from '@mui/material/Container';
+import ArrowBackRoundedIcon from '@mui/icons-material/ArrowBackRounded';
+import ToggleColorMode from './components/ToggleColorMode';
+import getCheckoutTheme from './theme/getCheckoutTheme';
+
+const StyledAppBar = styled(AppBar)(({ theme }) => ({
+ position: 'fixed',
+ display: 'flex',
+ alignItems: 'center',
+ justifyContent: 'space-between',
+ flexShrink: 0,
+ borderBottom: '1px solid',
+ borderColor: theme.palette.divider,
+ backgroundColor: theme.palette.background.paper,
+ boxShadow: theme.shadows[1],
+ backgroundImage: 'none',
+ padding: 4,
+}));
+
+function NavBar({ showCustomTheme, toggleCustomTheme, mode, toggleColorMode }) {
+ const handleChange = (event) => {
+ toggleCustomTheme(event.target.value === 'custom');
+ };
+ const blogTheme = createTheme(getCheckoutTheme(mode));
+
+ return (
+
+
+
+
+ }
+ component="a"
+ href="/material-ui/getting-started/templates/"
+ sx={{ display: { xs: 'none', sm: 'flex' } }}
+ >
+ Back to templates
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
+
+NavBar.propTypes = {
+ mode: PropTypes.oneOf(['dark', 'light']).isRequired,
+ showCustomTheme: PropTypes.bool.isRequired,
+ toggleColorMode: PropTypes.func.isRequired,
+ toggleCustomTheme: PropTypes.func.isRequired,
+};
+
+export default NavBar;
diff --git a/docs/data/material/getting-started/templates/checkout/NavBar.tsx b/docs/data/material/getting-started/templates/checkout/NavBar.tsx
new file mode 100644
index 00000000000000..27bbe98687ae72
--- /dev/null
+++ b/docs/data/material/getting-started/templates/checkout/NavBar.tsx
@@ -0,0 +1,107 @@
+import * as React from 'react';
+import {
+ createTheme,
+ ThemeProvider,
+ PaletteMode,
+ styled,
+} from '@mui/material/styles';
+import Select, { SelectChangeEvent } from '@mui/material/Select';
+import MenuItem from '@mui/material/MenuItem';
+import FormControl from '@mui/material/FormControl';
+import Button from '@mui/material/Button';
+import IconButton from '@mui/material/IconButton';
+import Box from '@mui/material/Box';
+import AppBar from '@mui/material/AppBar';
+import Toolbar from '@mui/material/Toolbar';
+import Container from '@mui/material/Container';
+import ArrowBackRoundedIcon from '@mui/icons-material/ArrowBackRounded';
+import ToggleColorMode from './components/ToggleColorMode';
+import getCheckoutTheme from './theme/getCheckoutTheme';
+
+const StyledAppBar = styled(AppBar)(({ theme }) => ({
+ position: 'fixed',
+ display: 'flex',
+ alignItems: 'center',
+ justifyContent: 'space-between',
+ flexShrink: 0,
+ borderBottom: '1px solid',
+ borderColor: theme.palette.divider,
+ backgroundColor: theme.palette.background.paper,
+ boxShadow: theme.shadows[1],
+ backgroundImage: 'none',
+ padding: 4,
+}));
+
+interface NavBarProps {
+ showCustomTheme: boolean;
+ toggleCustomTheme: (theme: boolean) => void;
+ mode: PaletteMode;
+ toggleColorMode: () => void;
+}
+
+export default function NavBar({
+ showCustomTheme,
+ toggleCustomTheme,
+ mode,
+ toggleColorMode,
+}: NavBarProps) {
+ const handleChange = (event: SelectChangeEvent) => {
+ toggleCustomTheme(event.target.value === 'custom');
+ };
+ const blogTheme = createTheme(getCheckoutTheme(mode));
+
+ return (
+
+
+
+
+ }
+ component="a"
+ href="/material-ui/getting-started/templates/"
+ sx={{ display: { xs: 'none', sm: 'flex' } }}
+ >
+ Back to templates
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/docs/data/material/getting-started/templates/checkout/AddressForm.js b/docs/data/material/getting-started/templates/checkout/components/AddressForm.js
similarity index 100%
rename from docs/data/material/getting-started/templates/checkout/AddressForm.js
rename to docs/data/material/getting-started/templates/checkout/components/AddressForm.js
diff --git a/docs/data/material/getting-started/templates/checkout/AddressForm.tsx b/docs/data/material/getting-started/templates/checkout/components/AddressForm.tsx
similarity index 100%
rename from docs/data/material/getting-started/templates/checkout/AddressForm.tsx
rename to docs/data/material/getting-started/templates/checkout/components/AddressForm.tsx
diff --git a/docs/data/material/getting-started/templates/checkout/Info.js b/docs/data/material/getting-started/templates/checkout/components/Info.js
similarity index 100%
rename from docs/data/material/getting-started/templates/checkout/Info.js
rename to docs/data/material/getting-started/templates/checkout/components/Info.js
diff --git a/docs/data/material/getting-started/templates/checkout/Info.tsx b/docs/data/material/getting-started/templates/checkout/components/Info.tsx
similarity index 100%
rename from docs/data/material/getting-started/templates/checkout/Info.tsx
rename to docs/data/material/getting-started/templates/checkout/components/Info.tsx
diff --git a/docs/data/material/getting-started/templates/checkout/InfoMobile.js b/docs/data/material/getting-started/templates/checkout/components/InfoMobile.js
similarity index 100%
rename from docs/data/material/getting-started/templates/checkout/InfoMobile.js
rename to docs/data/material/getting-started/templates/checkout/components/InfoMobile.js
diff --git a/docs/data/material/getting-started/templates/checkout/InfoMobile.tsx b/docs/data/material/getting-started/templates/checkout/components/InfoMobile.tsx
similarity index 100%
rename from docs/data/material/getting-started/templates/checkout/InfoMobile.tsx
rename to docs/data/material/getting-started/templates/checkout/components/InfoMobile.tsx
diff --git a/docs/data/material/getting-started/templates/checkout/PaymentForm.js b/docs/data/material/getting-started/templates/checkout/components/PaymentForm.js
similarity index 100%
rename from docs/data/material/getting-started/templates/checkout/PaymentForm.js
rename to docs/data/material/getting-started/templates/checkout/components/PaymentForm.js
diff --git a/docs/data/material/getting-started/templates/checkout/PaymentForm.tsx b/docs/data/material/getting-started/templates/checkout/components/PaymentForm.tsx
similarity index 100%
rename from docs/data/material/getting-started/templates/checkout/PaymentForm.tsx
rename to docs/data/material/getting-started/templates/checkout/components/PaymentForm.tsx
diff --git a/docs/data/material/getting-started/templates/checkout/Review.js b/docs/data/material/getting-started/templates/checkout/components/Review.js
similarity index 100%
rename from docs/data/material/getting-started/templates/checkout/Review.js
rename to docs/data/material/getting-started/templates/checkout/components/Review.js
diff --git a/docs/data/material/getting-started/templates/checkout/Review.tsx b/docs/data/material/getting-started/templates/checkout/components/Review.tsx
similarity index 100%
rename from docs/data/material/getting-started/templates/checkout/Review.tsx
rename to docs/data/material/getting-started/templates/checkout/components/Review.tsx
diff --git a/docs/data/material/getting-started/templates/checkout/SitemarkIcon.js b/docs/data/material/getting-started/templates/checkout/components/SitemarkIcon.js
similarity index 98%
rename from docs/data/material/getting-started/templates/checkout/SitemarkIcon.js
rename to docs/data/material/getting-started/templates/checkout/components/SitemarkIcon.js
index f313221f7f9a3c..f46802704ac3af 100644
--- a/docs/data/material/getting-started/templates/checkout/SitemarkIcon.js
+++ b/docs/data/material/getting-started/templates/checkout/components/SitemarkIcon.js
@@ -3,7 +3,7 @@ import SvgIcon from '@mui/material/SvgIcon';
export default function SitemarkIcon() {
return (
-
+