upconta.frontend-utils 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,39 @@
1
+ import { Menu } from 'antd'
2
+ import Link from 'next/link'
3
+ import { ReactNode, FC } from 'react'
4
+ import { LayoutBase, ContextoEmpresa, useContextoEmpresa } from '../'
5
+
6
+ const Layout: FC<{ children: ReactNode }> = ({ children }) => {
7
+ const { nombreEmpresa, nombreUsuario } = useContextoEmpresa()
8
+
9
+ return (
10
+ <LayoutBase
11
+ sidebar={{
12
+ title: { label: 'Upconta Frontend', href: '/' },
13
+ menu: (
14
+ <Menu
15
+ theme="dark"
16
+ mode="inline"
17
+ items={[
18
+ {
19
+ label: <Link href="/sellers">Vendedores</Link>,
20
+ key: 'vendedores',
21
+ },
22
+ ]}
23
+ />
24
+ ),
25
+ }}
26
+ navbar={{ title: nombreEmpresa, options: <>{nombreUsuario}</> }}
27
+ >
28
+ {children}
29
+ </LayoutBase>
30
+ )
31
+ }
32
+
33
+ const LayoutPrincipal: FC<{ children: ReactNode }> = ({ children }) => (
34
+ <ContextoEmpresa>
35
+ <Layout>{children}</Layout>
36
+ </ContextoEmpresa>
37
+ )
38
+
39
+ export default LayoutPrincipal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "upconta.frontend-utils",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "",
5
5
  "main": ".dist/cjs/index.js",
6
6
  "module": ".dist/esm/index.js",