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
64 lines
2.0 KiB
TypeScript
64 lines
2.0 KiB
TypeScript
import Card from '@mui/joy/Card';
|
|
import CardActions from '@mui/joy/CardActions';
|
|
import CardContent from '@mui/joy/CardContent';
|
|
import Checkbox from '@mui/joy/Checkbox';
|
|
import Divider from '@mui/joy/Divider';
|
|
import FormControl from '@mui/joy/FormControl';
|
|
import FormLabel from '@mui/joy/FormLabel';
|
|
import Input from '@mui/joy/Input';
|
|
import Typography from '@mui/joy/Typography';
|
|
import Button from '@mui/joy/Button';
|
|
import InfoOutlined from '@mui/icons-material/InfoOutlined';
|
|
import CreditCardIcon from '@mui/icons-material/CreditCard';
|
|
|
|
export default function CreditCardForm() {
|
|
return (
|
|
<Card
|
|
variant="outlined"
|
|
sx={{
|
|
maxHeight: 'max-content',
|
|
maxWidth: '100%',
|
|
mx: 'auto',
|
|
// to make the demo resizable
|
|
overflow: 'auto',
|
|
resize: 'horizontal',
|
|
}}
|
|
>
|
|
<Typography level="title-lg" startDecorator={<InfoOutlined />}>
|
|
Add new card
|
|
</Typography>
|
|
<Divider inset="none" />
|
|
<CardContent
|
|
sx={{
|
|
display: 'grid',
|
|
gridTemplateColumns: 'repeat(2, minmax(80px, 1fr))',
|
|
gap: 1.5,
|
|
}}
|
|
>
|
|
<FormControl sx={{ gridColumn: '1/-1' }}>
|
|
<FormLabel>Card number</FormLabel>
|
|
<Input endDecorator={<CreditCardIcon />} />
|
|
</FormControl>
|
|
<FormControl>
|
|
<FormLabel>Expiry date</FormLabel>
|
|
<Input endDecorator={<CreditCardIcon />} />
|
|
</FormControl>
|
|
<FormControl>
|
|
<FormLabel>CVC/CVV</FormLabel>
|
|
<Input endDecorator={<InfoOutlined />} />
|
|
</FormControl>
|
|
<FormControl sx={{ gridColumn: '1/-1' }}>
|
|
<FormLabel>Card holder name</FormLabel>
|
|
<Input placeholder="Enter cardholder's full name" />
|
|
</FormControl>
|
|
<Checkbox label="Save card" sx={{ gridColumn: '1/-1', my: 1 }} />
|
|
<CardActions sx={{ gridColumn: '1/-1' }}>
|
|
<Button variant="solid" color="primary">
|
|
Add card
|
|
</Button>
|
|
</CardActions>
|
|
</CardContent>
|
|
</Card>
|
|
);
|
|
}
|