Modificación del formulario

Cambios en los campos del formulario
This commit is contained in:
Traym17 2022-07-11 21:16:19 -06:00
parent d41d9e8c55
commit 3fc5e59575
1 changed files with 20 additions and 25 deletions

View File

@ -5,43 +5,38 @@ import { InputTextarea } from 'primereact/inputtextarea';
import { Dropdown } from 'primereact/dropdown';
const FormAdminSistema = () => {
const [dropdownItem, setDropdownItem] = useState(null);
const dropdownItems = [
{ name: 'Option 1', code: 'Option 1' },
{ name: 'Option 2', code: 'Option 2' },
{ name: 'Option 3', code: 'Option 3' }
];
const registrarAdmin = () => {
console.log('holis');
}
return (
<div className="grid">
<div className="col-12">
<div className="card">
<h5>Advanced</h5>
<h5>Registro de un administrador del sistema</h5>
<div className="p-fluid formgrid grid">
<div className="field col-12 md:col-6">
<label htmlFor="firstname2">Firstname</label>
<InputText id="firstname2" type="text" />
<label htmlFor="nombre">Nombre</label>
<InputText id="nombre" type="text" />
</div>
<div className="field col-12 md:col-6">
<label htmlFor="lastname2">Lastname</label>
<InputText id="lastname2" type="text" />
<label htmlFor="apellidos">Apellidos</label>
<InputText id="apellidos" type="text" />
</div>
<div className="field col-12 md:col-6">
<label htmlFor="correo_electronico">Correo electrónico</label>
<InputText id="correo_electronico" type="text" />
</div>
<div className="field col-12 md:col-6">
<label htmlFor="identificacion">Identificación</label>
<InputText id="identificacion" type="text" />
</div>
<div className="field col-12">
<label htmlFor="address">Address</label>
<InputTextarea id="address" rows="4" />
</div>
<div className="field col-12 md:col-6">
<label htmlFor="city">City</label>
<InputText id="city" type="text" />
</div>
<div className="field col-12 md:col-3">
<label htmlFor="state">State</label>
<Dropdown id="state" value={dropdownItem} onChange={(e) => setDropdownItem(e.value)} options={dropdownItems} optionLabel="name" placeholder="Select One"></Dropdown>
</div>
<div className="field col-12 md:col-3">
<label htmlFor="zip">Zip</label>
<InputText id="zip" type="text" />
<label htmlFor="telefono">Teléfono</label>
<InputText id="telefono" type="text" rows="4" />
</div>
<Button label="Registrar" onClick={registrarAdmin}></Button>
</div>
</div>
</div>