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'; import { Dropdown } from 'primereact/dropdown';
const FormAdminSistema = () => { const FormAdminSistema = () => {
const [dropdownItem, setDropdownItem] = useState(null);
const dropdownItems = [ const registrarAdmin = () => {
{ name: 'Option 1', code: 'Option 1' }, console.log('holis');
{ name: 'Option 2', code: 'Option 2' }, }
{ name: 'Option 3', code: 'Option 3' }
];
return ( return (
<div className="grid"> <div className="grid">
<div className="col-12"> <div className="col-12">
<div className="card"> <div className="card">
<h5>Advanced</h5> <h5>Registro de un administrador del sistema</h5>
<div className="p-fluid formgrid grid"> <div className="p-fluid formgrid grid">
<div className="field col-12 md:col-6"> <div className="field col-12 md:col-6">
<label htmlFor="firstname2">Firstname</label> <label htmlFor="nombre">Nombre</label>
<InputText id="firstname2" type="text" /> <InputText id="nombre" type="text" />
</div> </div>
<div className="field col-12 md:col-6"> <div className="field col-12 md:col-6">
<label htmlFor="lastname2">Lastname</label> <label htmlFor="apellidos">Apellidos</label>
<InputText id="lastname2" type="text" /> <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>
<div className="field col-12"> <div className="field col-12">
<label htmlFor="address">Address</label> <label htmlFor="telefono">Teléfono</label>
<InputTextarea id="address" rows="4" /> <InputText id="telefono" type="text" 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" />
</div> </div>
<Button label="Registrar" onClick={registrarAdmin}></Button>
</div> </div>
</div> </div>
</div> </div>