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

Add basic inputs for step 1 #34

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions intranet/src/core/theme/main.theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ export const mainTheme = createTheme({
fontFamily: 'Oswald',
fontWeight: 600,
},
h5: {
fontFamily: 'Oswald',
fontWeight: 400,
},
},
spacing: 8,
shape: {
Expand Down
89 changes: 85 additions & 4 deletions intranet/src/pods/sign-up/sign-up.component.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,100 @@
import { Button, Typography } from '@mui/material';
import { Button, TextField, Typography } from '@mui/material';

import { useState } from 'react';
import * as classes from './sign-up.styles';

export const SignUpComponent: React.FC = () => {
const [formData, setFormData] = useState({
email: '',
repeatEmail: '',
password: '',
repeatPassword: '',
});

const onTextFieldChange = (e: React.ChangeEvent<HTMLInputElement>) => {
setFormData({ ...formData, [e.target.id]: e.target.value });
};

const goToNextStep = () => {
console.log('Go to next step');
console.log({ formData });
};

return (
<>
<Typography variant="h4" component="h1">
Crea tu cuenta
Crea tu carta
</Typography>
<div className={classes.steps}>{/* Components for diferents estates of sign-in */}</div>
<div className={classes.steps}>
<Typography variant="h5" component="h2" textAlign={'center'}>
Paso 1 - Crear cuenta
</Typography>
<form>
<TextField
value={formData.email}
onChange={onTextFieldChange}
required
id="email"
label="Email"
type="email"
margin="normal"
fullWidth
autoComplete="username"
InputLabelProps={{
shrink: true,
}}
/>
<TextField
value={formData.repeatEmail}
onChange={onTextFieldChange}
required
id="repeatEmail"
label="Repetir Email"
type="email"
margin="normal"
fullWidth
autoComplete="username"
InputLabelProps={{
shrink: true,
}}
/>
<TextField
value={formData.password}
onChange={onTextFieldChange}
required
id="password"
label="Clave"
type="password"
margin="normal"
fullWidth
autoComplete="new-password"
InputLabelProps={{
shrink: true,
}}
/>
<TextField
value={formData.repeatPassword}
onChange={onTextFieldChange}
required
id="repeatPassword"
label="Repetir Clave"
type="password"
margin="normal"
fullWidth
autoComplete="new-password"
InputLabelProps={{
shrink: true,
}}
/>
</form>
</div>
<div className={classes.buttons}>
<Button color="secondary" variant="contained">
Anterior
</Button>
<Button variant="contained">Siguiente</Button>
<Button variant="contained" onClick={goToNextStep}>
Siguiente
</Button>
</div>
</>
);
Expand Down