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

Feat: crear componentes de formulario y reestructurar el proyecto #45

Merged
merged 3 commits into from
May 24, 2024
Merged
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
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
<title>Inmobiliaria "Sin nombre"</title>
</head>
<body>
<div id="root"></div>
Expand Down
29 changes: 0 additions & 29 deletions src/components/AboutUs/AboutUs.tsx

This file was deleted.

29 changes: 0 additions & 29 deletions src/components/CardProperty/CardProperty.tsx

This file was deleted.

121 changes: 0 additions & 121 deletions src/components/Carousel/Carousel.css

This file was deleted.

107 changes: 0 additions & 107 deletions src/components/Carousel/Carousel.tsx

This file was deleted.

12 changes: 0 additions & 12 deletions src/components/Carousel/data.ts

This file was deleted.

File renamed without changes.
69 changes: 69 additions & 0 deletions src/components/FormLogReg/FormLogReg.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import React from 'react'
import Inputs from './components/Inputs'
import './FormLogReg.css'

interface Input {
id: string; // Identificador único
label: string;
placeholder: string;
type: string;
icon?: string;
}

interface FormLogRegProps {
type: 'login' | 'register';
inputs: Input[];
}

const FormLogReg: React.FC<FormLogRegProps> = ({ type, inputs }) => {
return (
<>
<div className='header'>
<img src='' alt='' />
<h2>INMOBILIARIA</h2>
<h3>¡Bienvenido!</h3>
</div>
<form action=''>
<Inputs inputs={inputs} />
{type === 'login'
? (
<div>
<div>
<input type='checkbox' />
<p>Recordarme</p>
</div>
<div>¿Olvidaste tu contraseña?</div>
</div>
)
: (
<div>
<input type='checkbox' /> Acepto los términos y condiciones de uso
</div>
)}
{type === 'login'
? (
<button>Iniciar sesión</button>
)
: (
<button>Registrarse</button>
)}
</form>

<div>
{type === 'login'
? (
<p>
¿No tienes cuenta? <span>Regístrate</span>
</p>
)
: (
<p>
¿Ya tienes cuenta? <span>Inicia sesión</span>
</p>
)}
</div>
</>
)
}

export default FormLogReg
Loading
Loading