- added main layout, sidebar, toolbar;

- started dashboard page, added first widget;
- created new theme 'gepafin' - styles for the app;
This commit is contained in:
Vitalii Kiiko
2024-08-12 16:55:30 +02:00
parent 9eb9dc40d8
commit c09127a675
137 changed files with 12038 additions and 66 deletions

View File

@@ -0,0 +1,50 @@
import React, { useRef } from 'react';
import { __ } from '@wordpress/i18n';
// components
import { Menu } from 'primereact/menu';
import { Avatar } from 'primereact/avatar';
import { Toast } from 'primereact/toast';
const TopBarProfileMenu = ({ menuLeftRef }) => {
const toast = useRef();
let items = [
{
template: (item, options) => {
return (
<div className="topBar__menuProfileItem">
<Avatar image="https://primefaces.org/cdn/primereact/images/avatar/amyelsner.png" shape="circle" />
<div className="userInfo">
<span className="userName">Mario Rossi</span>
<span className="userEmail">mario.rossi@example.com</span>
</div>
</div>
);
}
},
{
label: __('Il mio profilo', 'gepafin'),
command: () => {
console.log('go to profile page')
}
},
{
separator: true
},
{
label: __('Logout', 'gepafin'),
icon: 'pi pi-sign-out',
command: () => {
console.log('logout')
}
}
];
return <>
<Toast ref={toast}/>
<Menu model={items} popup ref={menuLeftRef} id="topBar_profileMenu" className="topBar__menuProfile"/>
</>
}
export default TopBarProfileMenu;