From d41d9e8c550ad4719312b38ed9ca4f97583d9b28 Mon Sep 17 00:00:00 2001 From: Traym17 <51390112+Traym17@users.noreply.github.com> Date: Mon, 11 Jul 2022 20:57:57 -0600 Subject: [PATCH] Componente formulario MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Creación del componente del formulario de registro del administrador del sistema --- web-ui/web-react/src/App.js | 9 ++- .../src/components/FormAdminSistema.js | 56 +++++++++++++++++++ 2 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 web-ui/web-react/src/components/FormAdminSistema.js diff --git a/web-ui/web-react/src/App.js b/web-ui/web-react/src/App.js index c605f85d..22936c88 100644 --- a/web-ui/web-react/src/App.js +++ b/web-ui/web-react/src/App.js @@ -28,6 +28,7 @@ import TreeDemo from './components/TreeDemo'; import InvalidStateDemo from './components/InvalidStateDemo'; import BlocksDemo from './components/BlocksDemo'; import IconsDemo from './components/IconsDemo'; +import FormAdminSistema from './components/FormAdminSistema'; import Crud from './pages/Crud'; import EmptyPage from './pages/EmptyPage'; @@ -159,9 +160,10 @@ const App = () => { const menu = [ { label: 'Home', - items: [{ - label: 'Dashboard', icon: 'pi pi-fw pi-home', to: '/' - }] + items: [ + {label: 'Dashboard', icon: 'pi pi-fw pi-home', to: '/'}, + {label: 'Registro admin sistema', icon: 'pi pi-fw pi-id-card', to: '/formAdminSistema'} + ] }, { label: 'UI Components', icon: 'pi pi-fw pi-sitemap', @@ -320,6 +322,7 @@ const App = () => { + diff --git a/web-ui/web-react/src/components/FormAdminSistema.js b/web-ui/web-react/src/components/FormAdminSistema.js new file mode 100644 index 00000000..45b9ec55 --- /dev/null +++ b/web-ui/web-react/src/components/FormAdminSistema.js @@ -0,0 +1,56 @@ +import React, { useState } from 'react'; +import { InputText } from 'primereact/inputtext'; +import { Button } from 'primereact/button'; +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' } + ]; + + return ( +
+
+
+
Advanced
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + setDropdownItem(e.value)} options={dropdownItems} optionLabel="name" placeholder="Select One"> +
+
+ + +
+
+
+
+
+ ) +} + +const comparisonFn = function (prevProps, nextProps) { + return prevProps.location.pathname === nextProps.location.pathname; +}; + +export default React.memo(FormAdminSistema, comparisonFn);