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

[material-ui] Refine checkout template #40967

Merged
merged 72 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from 66 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
802a209
Redesigned the layout
zanivan Feb 6, 2024
5a4e42a
More refinement
zanivan Feb 6, 2024
45501f4
More polishing
zanivan Feb 7, 2024
d45f44b
Merge remote-tracking branch 'upstream/master' into template-polishin…
zanivan Feb 8, 2024
f936fc2
More polishing
zanivan Feb 8, 2024
de31b79
Tweaks to mobile and responsive
zanivan Feb 9, 2024
82af236
Merge remote-tracking branch 'upstream/master' into template-polishin…
zanivan Feb 13, 2024
b989f93
Add card to payment details
zanivan Feb 13, 2024
03164e3
Merge remote-tracking branch 'upstream/master' into template-polishin…
zanivan Feb 14, 2024
eee9a21
Tweaks to mobile version
zanivan Feb 14, 2024
c4397ca
Fix lint
zanivan Feb 14, 2024
47ab2ce
Merge remote-tracking branch 'upstream/master' into template-polishin…
zanivan Feb 15, 2024
2208ffb
Standardize theme toggler
zanivan Feb 15, 2024
6925275
Merge remote-tracking branch 'upstream/master' into template-polishin…
zanivan Feb 19, 2024
b9e294f
remove material icon
zanivan Feb 19, 2024
2cdeefd
Fix bug with logo on default theme
zanivan Feb 19, 2024
f72693e
Fix typo
zanivan Feb 19, 2024
01ce3c5
Round of polishing after feedback
zanivan Feb 20, 2024
3615c70
Fix eslint
zanivan Feb 20, 2024
083c555
Merge remote-tracking branch 'upstream/master' into template-polishin…
zanivan Feb 21, 2024
1bd68fb
Round of polishing after Sam's feedback
zanivan Feb 21, 2024
c12642d
Run docs:typescript:formatted
zanivan Feb 21, 2024
d8db47b
First round of polishing after Matt's feedback
zanivan Feb 21, 2024
e9d42cc
run docs:typescript:formatted
zanivan Feb 21, 2024
c2ae6a1
Add info section to mobile
zanivan Feb 22, 2024
956bd6c
docs:typescript:formatted
zanivan Feb 22, 2024
ac230c0
Make credit card have the right aspect ratio
zanivan Feb 22, 2024
0a5aeab
Isolate Checkout's theme from LP theme
zanivan Feb 22, 2024
2a008be
Sanitise and format data on the credit card
zanivan Feb 22, 2024
e075d3b
docs:typescript:formatted
zanivan Feb 22, 2024
1863706
Fix typescript
zanivan Feb 22, 2024
8438344
fix lint
zanivan Feb 22, 2024
84410ed
More polishing and fixes
zanivan Feb 23, 2024
0c64d16
Tweaks to dark theme
zanivan Feb 23, 2024
68e2fcc
Fix MD dark theme
zanivan Feb 23, 2024
166d006
Add 'back to' back button
zanivan Feb 26, 2024
13724c5
Switch the background colors
zanivan Feb 26, 2024
0cdf49d
Add box-shadow to MuiOutlinedInput
zanivan Feb 26, 2024
1aa1ee6
Tweaks to placeholder color
zanivan Feb 26, 2024
93f71f1
Fix required props
zanivan Feb 26, 2024
b10e1ab
Remove dotted line
zanivan Feb 26, 2024
598b977
Add icons do buttons
zanivan Feb 26, 2024
40c6bab
Softens buttons' borders
zanivan Feb 26, 2024
1e48248
Make the credit card bigger
zanivan Feb 26, 2024
261f63c
Tweaks to success page
zanivan Feb 26, 2024
1954ff3
Fix responsiveness
zanivan Feb 26, 2024
2e13383
run docs:typescript:formatted
zanivan Feb 26, 2024
472a8f4
Tweaks to button border
zanivan Feb 27, 2024
51ea676
Fix LP theme
zanivan Feb 27, 2024
95f9e91
Merge remote-tracking branch 'upstream/master' into template-polishin…
zanivan Feb 28, 2024
3d7da6d
Danilo's feedback
zanivan Feb 28, 2024
6a03a1f
Remove unused components from theme
zanivan Feb 28, 2024
854aeaa
Make inputs consistent
zanivan Feb 28, 2024
09c6ed2
Add radio group to payments
zanivan Feb 28, 2024
16c520f
Run docs:typescript:formatted
zanivan Feb 29, 2024
31afdcd
Fix lint
zanivan Feb 29, 2024
ee78349
Merge remote-tracking branch 'upstream/master' into template-polishin…
zanivan Feb 29, 2024
ad72bf8
Prettier
zanivan Feb 29, 2024
9a5b975
Round of polishing after Danilo's feedback
zanivan Mar 4, 2024
ffa59ec
Organize imports
zanivan Mar 4, 2024
1400bf0
Fix a11y errors
zanivan Mar 4, 2024
076326f
Run docs:typescript:formatted
zanivan Mar 4, 2024
060617e
Update thumbnail
zanivan Mar 4, 2024
76cd836
More polishing
zanivan Mar 5, 2024
1f70bf0
Run docs:typescript:formatted
zanivan Mar 5, 2024
42a94ec
Run prettier
zanivan Mar 5, 2024
c9f7b86
Merge remote-tracking branch 'upstream/master' into template-polishin…
zanivan Mar 6, 2024
7c70048
Skip regression test for theme file
zanivan Mar 6, 2024
421bc80
Merge remote-tracking branch 'upstream/master' into template-polishin…
zanivan Mar 6, 2024
0d1a233
Merge remote-tracking branch 'upstream/master' into template-polishin…
zanivan Mar 6, 2024
d5c6f9e
Merge remote-tracking branch 'upstream/master' into template-polishin…
zanivan Mar 7, 2024
257acbb
Merge remote-tracking branch 'upstream/master' into template-polishin…
zanivan Mar 8, 2024
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
223 changes: 121 additions & 102 deletions docs/data/material/getting-started/templates/checkout/AddressForm.js
Original file line number Diff line number Diff line change
@@ -1,109 +1,128 @@
import * as React from 'react';
import Grid from '@mui/material/Grid';
import Typography from '@mui/material/Typography';
import TextField from '@mui/material/TextField';
import FormControlLabel from '@mui/material/FormControlLabel';

import Checkbox from '@mui/material/Checkbox';
import FormControlLabel from '@mui/material/FormControlLabel';
import FormLabel from '@mui/material/FormLabel';
import Grid from '@mui/material/Grid';
import OutlinedInput from '@mui/material/OutlinedInput';
import { styled } from '@mui/system';

const FormGrid = styled(Grid)(() => ({
display: 'flex',
flexDirection: 'column',
}));

export default function AddressForm() {
return (
<React.Fragment>
<Typography variant="h6" gutterBottom>
Shipping address
</Typography>
<Grid container spacing={3}>
<Grid item xs={12} sm={6}>
<TextField
required
id="firstName"
name="firstName"
label="First name"
fullWidth
autoComplete="given-name"
variant="standard"
/>
</Grid>
<Grid item xs={12} sm={6}>
<TextField
required
id="lastName"
name="lastName"
label="Last name"
fullWidth
autoComplete="family-name"
variant="standard"
/>
</Grid>
<Grid item xs={12}>
<TextField
required
id="address1"
name="address1"
label="Address line 1"
fullWidth
autoComplete="shipping address-line1"
variant="standard"
/>
</Grid>
<Grid item xs={12}>
<TextField
id="address2"
name="address2"
label="Address line 2"
fullWidth
autoComplete="shipping address-line2"
variant="standard"
/>
</Grid>
<Grid item xs={12} sm={6}>
<TextField
required
id="city"
name="city"
label="City"
fullWidth
autoComplete="shipping address-level2"
variant="standard"
/>
</Grid>
<Grid item xs={12} sm={6}>
<TextField
id="state"
name="state"
label="State/Province/Region"
fullWidth
variant="standard"
/>
</Grid>
<Grid item xs={12} sm={6}>
<TextField
required
id="zip"
name="zip"
label="Zip / Postal code"
fullWidth
autoComplete="shipping postal-code"
variant="standard"
/>
</Grid>
<Grid item xs={12} sm={6}>
<TextField
required
id="country"
name="country"
label="Country"
fullWidth
autoComplete="shipping country"
variant="standard"
/>
</Grid>
<Grid item xs={12}>
<FormControlLabel
control={<Checkbox color="secondary" name="saveAddress" value="yes" />}
label="Use this address for payment details"
/>
</Grid>
</Grid>
</React.Fragment>
<Grid container spacing={3}>
<FormGrid item xs={12} md={6}>
<FormLabel htmlFor="first-name" required>
First name
</FormLabel>
<OutlinedInput
id="first-name"
name="first-name"
type="name"
placeholder="John"
autoComplete="first name"
required
/>
</FormGrid>
<FormGrid item xs={12} md={6}>
<FormLabel htmlFor="last-name" required>
Last name
</FormLabel>
<OutlinedInput
id="last-name"
name="last-name"
type="last-name"
placeholder="Snow"
autoComplete="last name"
required
/>
</FormGrid>
<FormGrid item xs={12}>
<FormLabel htmlFor="address1" required>
Address line 1
</FormLabel>
<OutlinedInput
id="address1"
name="address1"
type="address1"
placeholder="Street name and number"
autoComplete="shipping address-line1"
required
/>
</FormGrid>
<FormGrid item xs={12}>
<FormLabel htmlFor="address2">Address line 2</FormLabel>
<OutlinedInput
id="address2"
name="address2"
type="address2"
placeholder="Apartment, suite, unit, etc. (optional)"
autoComplete="shipping address-line2"
required
/>
</FormGrid>
<FormGrid item xs={6}>
<FormLabel htmlFor="city" required>
City
</FormLabel>
<OutlinedInput
id="city"
name="city"
type="city"
placeholder="New York"
autoComplete="City"
required
/>
</FormGrid>
<FormGrid item xs={6}>
<FormLabel htmlFor="state" required>
State
</FormLabel>
<OutlinedInput
id="state"
name="state"
type="state"
placeholder="NY"
autoComplete="State"
required
/>
</FormGrid>
<FormGrid item xs={6}>
<FormLabel htmlFor="zip" required>
Zip / Postal code
</FormLabel>
<OutlinedInput
id="zip"
name="zip"
type="zip"
placeholder="12345"
autoComplete="shipping postal-code"
required
/>
</FormGrid>
<FormGrid item xs={6}>
<FormLabel htmlFor="country" required>
Country
</FormLabel>
<OutlinedInput
id="country"
name="country"
type="country"
placeholder="United States"
autoComplete="shipping country"
required
/>
</FormGrid>
<FormGrid item xs={12}>
<FormControlLabel
control={<Checkbox name="saveAddress" value="yes" />}
label="Use this address for payment details"
/>
</FormGrid>
</Grid>
);
}
Loading
Loading