responsive-system 1.4.2 → 1.4.5
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.
- package/dist/responsive-system.cjs +2 -6
- package/dist/responsive-system.cjs.map +1 -1
- package/dist/responsive-system.mjs +249 -360
- package/dist/responsive-system.mjs.map +1 -1
- package/package.json +1 -1
- package/scripts/postinstall.js +32 -73
- package/src/components/layout/Footer.tsx +5 -54
- package/src/components/layout/Navigation.tsx +18 -84
- package/src/components/layout/Sidebar.tsx +29 -58
- package/src/layouts/DashboardLayout.tsx +7 -44
- package/src/layouts/DefaultLayout.tsx +3 -8
- package/src/layouts/MinimalLayout.tsx +2 -5
- package/src/layouts/SidebarLayout.tsx +2 -7
|
@@ -1,59 +1,10 @@
|
|
|
1
|
-
import { useResponsiveLayout } from '../../hooks'
|
|
2
|
-
|
|
3
1
|
const Footer = () => {
|
|
4
|
-
const { layout, breakpoint, width, height } = useResponsiveLayout()
|
|
5
|
-
|
|
6
2
|
return (
|
|
7
|
-
<footer className="bg-
|
|
8
|
-
<div className=
|
|
9
|
-
<div className="
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<div>
|
|
13
|
-
<div className="flex items-center space-x-2 mb-2">
|
|
14
|
-
<div className="w-5 h-5 bg-cyan-500 rounded flex items-center justify-center">
|
|
15
|
-
<span className="text-white font-bold text-xs">RS</span>
|
|
16
|
-
</div>
|
|
17
|
-
<span className="text-white font-semibold text-sm">Responsive System</span>
|
|
18
|
-
</div>
|
|
19
|
-
<p className="text-gray-400 text-xs leading-relaxed">
|
|
20
|
-
Sistema completo de auto-escalado para aplicaciones React + Tailwind CSS
|
|
21
|
-
</p>
|
|
22
|
-
</div>
|
|
23
|
-
|
|
24
|
-
{/* Status */}
|
|
25
|
-
<div>
|
|
26
|
-
<h3 className="text-white font-semibold text-sm mb-2">Estado del Sistema</h3>
|
|
27
|
-
<div className="space-y-1">
|
|
28
|
-
<div className="flex items-center justify-between text-xs">
|
|
29
|
-
<span className="text-gray-400">Breakpoint:</span>
|
|
30
|
-
<span className="text-cyan-400 font-medium">{breakpoint.toUpperCase()}</span>
|
|
31
|
-
</div>
|
|
32
|
-
<div className="flex items-center justify-between text-xs">
|
|
33
|
-
<span className="text-gray-400">Layout:</span>
|
|
34
|
-
<span className="text-cyan-400 font-medium">{layout.config.name}</span>
|
|
35
|
-
</div>
|
|
36
|
-
<div className="flex items-center justify-between text-xs">
|
|
37
|
-
<span className="text-gray-400">Resolución:</span>
|
|
38
|
-
<span className="text-cyan-400 font-medium">{width} × {height}</span>
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
|
|
43
|
-
{/* Developer */}
|
|
44
|
-
<div>
|
|
45
|
-
<h3 className="text-white font-semibold text-sm mb-2">Desarrollador</h3>
|
|
46
|
-
<div className="space-y-1">
|
|
47
|
-
<p className="text-white font-medium text-xs">Felipe Caroca</p>
|
|
48
|
-
<p className="text-gray-400 text-xs">Frontend Developer</p>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
|
|
53
|
-
{/* Bottom */}
|
|
54
|
-
<div className="border-t border-gray-800 mt-4 pt-4 flex flex-col items-center text-center">
|
|
55
|
-
<p className="text-gray-500 text-xs">
|
|
56
|
-
© 2025 Responsive System. Todos los derechos reservados.
|
|
3
|
+
<footer className="bg-gray-900 border-t border-gray-800">
|
|
4
|
+
<div className="px-4 py-6">
|
|
5
|
+
<div className="max-w-7xl mx-auto text-center">
|
|
6
|
+
<p className="text-gray-400 text-sm">
|
|
7
|
+
© {new Date().getFullYear()} Tu Aplicación. Todos los derechos reservados.
|
|
57
8
|
</p>
|
|
58
9
|
</div>
|
|
59
10
|
</div>
|
|
@@ -1,95 +1,29 @@
|
|
|
1
|
-
import { useState } from 'react'
|
|
2
1
|
import { useResponsiveLayout } from '../../hooks'
|
|
3
|
-
import { useNavigation } from '../../context'
|
|
4
2
|
|
|
5
3
|
const Navigation = () => {
|
|
6
|
-
const { isMobile
|
|
7
|
-
|
|
8
|
-
const [sidebarOpen, setSidebarOpen] = useState(false)
|
|
9
|
-
|
|
10
|
-
const pages = [
|
|
11
|
-
{ id: 'demo', name: 'Demo' },
|
|
12
|
-
{ id: 'test', name: 'Suite de Test' }
|
|
13
|
-
]
|
|
14
|
-
|
|
4
|
+
const { isMobile } = useResponsiveLayout()
|
|
5
|
+
|
|
15
6
|
return (
|
|
16
|
-
<
|
|
17
|
-
<
|
|
18
|
-
<div className="
|
|
19
|
-
<div className="
|
|
20
|
-
<div className="flex items-center justify-
|
|
21
|
-
|
|
22
|
-
<div className="flex items-center space-x-2">
|
|
23
|
-
<div className="w-1.5 h-1.5 bg-cyan-400 rounded-full shadow-lg shadow-cyan-400/50 animate-pulse"></div>
|
|
24
|
-
<h3 className="text-base font-black text-white tracking-tight">
|
|
25
|
-
Sistema Responsivo
|
|
26
|
-
</h3>
|
|
27
|
-
</div>
|
|
28
|
-
<div className="px-2 py-0.5 text-cyan-400 font-mono bg-black/50 border border-cyan-500/30 rounded text-xs font-bold tracking-widest">
|
|
29
|
-
{breakpoint.toUpperCase()}
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
|
|
33
|
-
<div className="flex items-center space-x-2">
|
|
34
|
-
{/* Botones visibles solo en desktop */}
|
|
35
|
-
{!isMobile && pages.map(page => (
|
|
36
|
-
<button
|
|
37
|
-
key={page.id}
|
|
38
|
-
onClick={() => setCurrentPage(page.id as 'demo' | 'test')}
|
|
39
|
-
className={`px-3 py-1.5 rounded-lg transition-all font-bold text-xs tracking-wide border ${
|
|
40
|
-
currentPage === page.id
|
|
41
|
-
? 'bg-cyan-500/20 text-cyan-400 border-cyan-500/50'
|
|
42
|
-
: 'bg-black/50 text-gray-400 hover:text-gray-300 border-gray-700 hover:border-gray-600'
|
|
43
|
-
}`}
|
|
44
|
-
>
|
|
45
|
-
{page.name}
|
|
46
|
-
</button>
|
|
47
|
-
))}
|
|
48
|
-
|
|
49
|
-
{/* Menú hamburguesa para móvil - A LA DERECHA */}
|
|
50
|
-
{isMobile && (
|
|
51
|
-
<button
|
|
52
|
-
onClick={() => setSidebarOpen(!sidebarOpen)}
|
|
53
|
-
className="p-2 rounded-lg text-gray-300 hover:text-cyan-400 hover:bg-cyan-500/10 transition-colors"
|
|
54
|
-
>
|
|
55
|
-
<svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
56
|
-
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 6h16M4 12h16M4 18h16" />
|
|
57
|
-
</svg>
|
|
58
|
-
</button>
|
|
59
|
-
)}
|
|
7
|
+
<nav className="sticky top-0 z-50 bg-gray-900 border-b border-gray-800">
|
|
8
|
+
<div className="px-4 py-4">
|
|
9
|
+
<div className="flex items-center justify-between">
|
|
10
|
+
<div className="flex items-center space-x-3">
|
|
11
|
+
<div className="w-8 h-8 bg-gray-700 rounded-lg flex items-center justify-center">
|
|
12
|
+
<span className="text-white font-bold text-sm">LO</span>
|
|
60
13
|
</div>
|
|
14
|
+
<h1 className="text-white font-semibold text-lg">Tu Aplicación</h1>
|
|
61
15
|
</div>
|
|
16
|
+
|
|
17
|
+
{isMobile && (
|
|
18
|
+
<button className="p-2 text-gray-400 hover:text-white">
|
|
19
|
+
<svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
20
|
+
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 6h16M4 12h16M4 18h16" />
|
|
21
|
+
</svg>
|
|
22
|
+
</button>
|
|
23
|
+
)}
|
|
62
24
|
</div>
|
|
63
25
|
</div>
|
|
64
|
-
|
|
65
|
-
{/* Menú móvil desplegable - TRADICIONAL */}
|
|
66
|
-
{isMobile && sidebarOpen && (
|
|
67
|
-
<div className="absolute top-full left-0 right-0 bg-gradient-to-r from-gray-900 via-black to-gray-900 border-b border-cyan-500/20 shadow-2xl z-50">
|
|
68
|
-
<div className="p-4">
|
|
69
|
-
{/* Navigation - VERTICAL como menú tradicional */}
|
|
70
|
-
<nav className="space-y-2">
|
|
71
|
-
{pages.map((page) => (
|
|
72
|
-
<button
|
|
73
|
-
key={page.id}
|
|
74
|
-
onClick={() => {
|
|
75
|
-
setCurrentPage(page.id as 'demo' | 'test')
|
|
76
|
-
setSidebarOpen(false)
|
|
77
|
-
}}
|
|
78
|
-
className={`w-full text-left px-4 py-3 rounded-lg transition-all font-bold text-sm tracking-wide border ${
|
|
79
|
-
currentPage === page.id
|
|
80
|
-
? 'bg-cyan-500/20 text-cyan-400 border-cyan-500/50'
|
|
81
|
-
: 'bg-black/50 text-gray-400 hover:text-gray-300 border-gray-700 hover:border-gray-600'
|
|
82
|
-
}`}
|
|
83
|
-
>
|
|
84
|
-
{page.name}
|
|
85
|
-
</button>
|
|
86
|
-
))}
|
|
87
|
-
</nav>
|
|
88
|
-
</div>
|
|
89
|
-
</div>
|
|
90
|
-
)}
|
|
91
|
-
</nav>
|
|
92
|
-
</div>
|
|
26
|
+
</nav>
|
|
93
27
|
)
|
|
94
28
|
}
|
|
95
29
|
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import { useResponsiveLayout } from '../../hooks'
|
|
2
|
-
import {
|
|
2
|
+
import { useSidebar } from '../../context'
|
|
3
3
|
|
|
4
4
|
const Sidebar = () => {
|
|
5
|
-
const { isMobile, isTablet
|
|
6
|
-
const { currentPage, setCurrentPage } = useNavigation()
|
|
5
|
+
const { isMobile, isTablet } = useResponsiveLayout()
|
|
7
6
|
const { sidebarOpen, setSidebarOpen } = useSidebar()
|
|
8
7
|
|
|
9
8
|
const menuItems = [
|
|
10
|
-
{ id: '
|
|
11
|
-
{ id: '
|
|
9
|
+
{ id: 'home', label: 'Inicio' },
|
|
10
|
+
{ id: 'about', label: 'Acerca' },
|
|
11
|
+
{ id: 'contact', label: 'Contacto' },
|
|
12
12
|
]
|
|
13
13
|
|
|
14
14
|
return (
|
|
15
15
|
<>
|
|
16
|
-
{/* Hamburger button para móvil */}
|
|
17
16
|
{isMobile && (
|
|
18
17
|
<button
|
|
19
18
|
onClick={() => setSidebarOpen(true)}
|
|
20
|
-
className="fixed top-4 left-4 z-50 p-2 rounded-lg text-gray-300 hover:text-
|
|
19
|
+
className="fixed top-4 left-4 z-50 p-2 rounded-lg text-gray-300 hover:text-white hover:bg-gray-800 bg-gray-900 border border-gray-700"
|
|
21
20
|
>
|
|
22
21
|
<svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
23
22
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 6h16M4 12h16M4 18h16" />
|
|
@@ -25,73 +24,45 @@ const Sidebar = () => {
|
|
|
25
24
|
</button>
|
|
26
25
|
)}
|
|
27
26
|
|
|
28
|
-
{
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
`}>
|
|
34
|
-
<div className="p-6 flex flex-col h-full">
|
|
35
|
-
{/* Logo y Breakpoint */}
|
|
36
|
-
<div className="flex items-center space-x-3 mb-8">
|
|
37
|
-
<div className="w-8 h-8 bg-cyan-500 rounded-lg flex items-center justify-center">
|
|
38
|
-
<span className="text-white font-bold text-sm">RS</span>
|
|
39
|
-
</div>
|
|
40
|
-
<div>
|
|
41
|
-
<span className="text-white font-bold text-lg">Sistema Responsivo</span>
|
|
42
|
-
<div className="px-2 py-0.5 text-cyan-400 font-mono bg-black/50 border border-cyan-500/30 rounded text-xs font-bold tracking-widest mt-1">
|
|
43
|
-
{breakpoint.toUpperCase()}
|
|
27
|
+
<aside className={`bg-gray-900 border-r border-gray-800 ${isMobile ? 'hidden' : 'w-64 flex-shrink-0'} ${isTablet ? 'w-56' : 'w-64'}`}>
|
|
28
|
+
<div className="p-6 flex flex-col h-full">
|
|
29
|
+
<div className="flex items-center space-x-3 mb-8">
|
|
30
|
+
<div className="w-8 h-8 bg-gray-700 rounded-lg flex items-center justify-center">
|
|
31
|
+
<span className="text-white font-bold text-sm">LO</span>
|
|
44
32
|
</div>
|
|
33
|
+
<span className="text-white font-bold text-lg">Tu Aplicación</span>
|
|
45
34
|
</div>
|
|
35
|
+
|
|
36
|
+
<nav className="space-y-2">
|
|
37
|
+
{menuItems.map((item) => (
|
|
38
|
+
<button
|
|
39
|
+
key={item.id}
|
|
40
|
+
className="w-full flex items-center px-4 py-3 rounded-lg transition-all text-left text-gray-300 hover:text-white hover:bg-gray-800"
|
|
41
|
+
>
|
|
42
|
+
<span className="font-medium">{item.label}</span>
|
|
43
|
+
</button>
|
|
44
|
+
))}
|
|
45
|
+
</nav>
|
|
46
46
|
</div>
|
|
47
|
-
|
|
48
|
-
{/* Navigation */}
|
|
49
|
-
<nav className="space-y-2">
|
|
50
|
-
{menuItems.map((item) => (
|
|
51
|
-
<button
|
|
52
|
-
key={item.id}
|
|
53
|
-
onClick={() => setCurrentPage(item.id as 'demo' | 'test')}
|
|
54
|
-
className={`w-full flex items-center px-4 py-3 rounded-lg transition-all group text-left ${
|
|
55
|
-
currentPage === item.id
|
|
56
|
-
? 'bg-cyan-500/20 text-cyan-400 border border-cyan-500/50'
|
|
57
|
-
: 'text-gray-300 hover:text-cyan-400 hover:bg-cyan-500/10'
|
|
58
|
-
}`}
|
|
59
|
-
>
|
|
60
|
-
<span className="font-medium">{item.label}</span>
|
|
61
|
-
</button>
|
|
62
|
-
))}
|
|
63
|
-
</nav>
|
|
64
|
-
|
|
65
|
-
</div>
|
|
66
47
|
</aside>
|
|
67
48
|
|
|
68
|
-
{/* Sidebar móvil desplegable */}
|
|
69
49
|
{isMobile && sidebarOpen && (
|
|
70
50
|
<div className="fixed inset-0 z-40 bg-black/50" onClick={() => setSidebarOpen(false)}>
|
|
71
|
-
<div className="fixed top-0 left-0 w-64 h-full bg-
|
|
51
|
+
<div className="fixed top-0 left-0 w-64 h-full bg-gray-900 border-r border-gray-800">
|
|
72
52
|
<div className="p-6 flex flex-col h-full pt-20">
|
|
73
|
-
{/* Logo */}
|
|
74
53
|
<div className="flex items-center space-x-3 mb-8">
|
|
75
|
-
<div className="w-8 h-8 bg-
|
|
76
|
-
<span className="text-white font-bold text-sm">
|
|
54
|
+
<div className="w-8 h-8 bg-gray-700 rounded-lg flex items-center justify-center">
|
|
55
|
+
<span className="text-white font-bold text-sm">LO</span>
|
|
77
56
|
</div>
|
|
78
|
-
<span className="text-white font-bold text-lg">
|
|
57
|
+
<span className="text-white font-bold text-lg">Tu Aplicación</span>
|
|
79
58
|
</div>
|
|
80
59
|
|
|
81
|
-
{/* Navigation */}
|
|
82
60
|
<nav className="space-y-2">
|
|
83
61
|
{menuItems.map((item) => (
|
|
84
62
|
<button
|
|
85
63
|
key={item.id}
|
|
86
|
-
onClick={() =>
|
|
87
|
-
|
|
88
|
-
setSidebarOpen(false)
|
|
89
|
-
}}
|
|
90
|
-
className={`w-full flex items-center px-4 py-3 rounded-lg transition-all group text-left ${
|
|
91
|
-
currentPage === item.id
|
|
92
|
-
? 'bg-cyan-500/20 text-cyan-400 border border-cyan-500/50'
|
|
93
|
-
: 'text-gray-300 hover:text-cyan-400 hover:bg-cyan-500/10'
|
|
94
|
-
}`}
|
|
64
|
+
onClick={() => setSidebarOpen(false)}
|
|
65
|
+
className="w-full flex items-center px-4 py-3 rounded-lg transition-all text-left text-gray-300 hover:text-white hover:bg-gray-800"
|
|
95
66
|
>
|
|
96
67
|
<span className="font-medium">{item.label}</span>
|
|
97
68
|
</button>
|
|
@@ -1,66 +1,29 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { useResponsiveLayout } from '../hooks'
|
|
3
2
|
import { Sidebar, Footer } from '../components/layout'
|
|
4
|
-
import { SidebarProvider
|
|
3
|
+
import { SidebarProvider } from '../context'
|
|
5
4
|
|
|
6
5
|
interface DashboardLayoutProps {
|
|
7
6
|
children: React.ReactNode
|
|
8
7
|
}
|
|
9
8
|
|
|
10
9
|
const DashboardLayoutContent: React.FC<{ children: React.ReactNode }> = ({ children }) => {
|
|
11
|
-
const { layoutUtils } = useResponsiveLayout()
|
|
12
|
-
const { setSidebarOpen } = useSidebar()
|
|
13
|
-
|
|
14
10
|
return (
|
|
15
|
-
<div className="min-h-screen bg-
|
|
16
|
-
{/* Navbar para móvil (igual que SidebarLayout) */}
|
|
17
|
-
<div className="sticky top-0 z-50">
|
|
18
|
-
<nav className="bg-gradient-to-r from-gray-900 via-black to-gray-900 border-b border-cyan-500/20 shadow-2xl relative">
|
|
19
|
-
<div className="w-full">
|
|
20
|
-
<div className="px-4 py-4">
|
|
21
|
-
<div className="flex items-center justify-between">
|
|
22
|
-
<div className="flex items-center space-x-2">
|
|
23
|
-
{/* Hamburger button para móvil - A LA IZQUIERDA */}
|
|
24
|
-
<button
|
|
25
|
-
onClick={() => setSidebarOpen(true)}
|
|
26
|
-
className="p-2 rounded-lg text-gray-300 hover:text-cyan-400 hover:bg-cyan-500/10 transition-colors"
|
|
27
|
-
>
|
|
28
|
-
<svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
29
|
-
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 6h16M4 12h16M4 18h16" />
|
|
30
|
-
</svg>
|
|
31
|
-
</button>
|
|
32
|
-
|
|
33
|
-
<div className="flex items-center space-x-2">
|
|
34
|
-
<div className="w-1.5 h-1.5 bg-cyan-400 rounded-full shadow-lg shadow-cyan-400/50 animate-pulse"></div>
|
|
35
|
-
<h3 className="text-base font-black text-white tracking-tight">
|
|
36
|
-
Sistema Responsivo
|
|
37
|
-
</h3>
|
|
38
|
-
</div>
|
|
39
|
-
<div className="px-2 py-0.5 text-cyan-400 font-mono bg-black/50 border border-cyan-500/30 rounded text-xs font-bold tracking-widest">
|
|
40
|
-
DASHBOARD
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
</nav>
|
|
47
|
-
</div>
|
|
48
|
-
|
|
11
|
+
<div className="min-h-screen bg-gray-50 flex flex-col">
|
|
49
12
|
{/* Content area con sidebar */}
|
|
50
13
|
<div className="flex flex-1">
|
|
51
14
|
{/* Sidebar */}
|
|
52
15
|
<Sidebar />
|
|
53
16
|
|
|
54
17
|
{/* Main content */}
|
|
55
|
-
<main className="flex-1 overflow-auto">
|
|
56
|
-
<div className=
|
|
18
|
+
<main className="flex-1 overflow-auto flex flex-col">
|
|
19
|
+
<div className="flex-1">
|
|
57
20
|
{children}
|
|
58
21
|
</div>
|
|
22
|
+
|
|
23
|
+
{/* Footer */}
|
|
24
|
+
<Footer />
|
|
59
25
|
</main>
|
|
60
26
|
</div>
|
|
61
|
-
|
|
62
|
-
{/* Footer */}
|
|
63
|
-
<Footer />
|
|
64
27
|
</div>
|
|
65
28
|
)
|
|
66
29
|
}
|
|
@@ -1,24 +1,19 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { Navigation, Footer } from '../components/layout'
|
|
3
|
-
import { useResponsiveLayout } from '../hooks'
|
|
4
3
|
|
|
5
4
|
interface DefaultLayoutProps {
|
|
6
5
|
children: React.ReactNode
|
|
7
6
|
}
|
|
8
7
|
|
|
9
8
|
const DefaultLayout: React.FC<DefaultLayoutProps> = ({ children }) => {
|
|
10
|
-
const { layoutUtils } = useResponsiveLayout()
|
|
11
|
-
|
|
12
9
|
return (
|
|
13
|
-
<div className="min-h-screen bg-
|
|
10
|
+
<div className="min-h-screen bg-gray-50 flex flex-col">
|
|
14
11
|
{/* Navigation fijo arriba */}
|
|
15
12
|
<Navigation />
|
|
16
13
|
|
|
17
|
-
{/* Main content
|
|
14
|
+
{/* Main content */}
|
|
18
15
|
<main className="flex-1">
|
|
19
|
-
|
|
20
|
-
{children}
|
|
21
|
-
</div>
|
|
16
|
+
{children}
|
|
22
17
|
</main>
|
|
23
18
|
|
|
24
19
|
{/* Footer fijo abajo */}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { useResponsiveLayout } from '../hooks'
|
|
3
2
|
|
|
4
3
|
interface MinimalLayoutProps {
|
|
5
4
|
children: React.ReactNode
|
|
6
5
|
}
|
|
7
6
|
|
|
8
7
|
const MinimalLayout: React.FC<MinimalLayoutProps> = ({ children }) => {
|
|
9
|
-
const { layoutUtils } = useResponsiveLayout()
|
|
10
|
-
|
|
11
8
|
return (
|
|
12
|
-
<div className="min-h-screen bg-
|
|
13
|
-
<main
|
|
9
|
+
<div className="min-h-screen bg-gray-50">
|
|
10
|
+
<main>
|
|
14
11
|
{children}
|
|
15
12
|
</main>
|
|
16
13
|
</div>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { useResponsiveLayout } from '../hooks'
|
|
3
2
|
import { Sidebar } from '../components/layout'
|
|
4
3
|
import { SidebarProvider } from '../context'
|
|
5
4
|
|
|
@@ -8,18 +7,14 @@ interface SidebarLayoutProps {
|
|
|
8
7
|
}
|
|
9
8
|
|
|
10
9
|
const SidebarLayoutContent: React.FC<{ children: React.ReactNode }> = ({ children }) => {
|
|
11
|
-
const { layoutUtils } = useResponsiveLayout()
|
|
12
|
-
|
|
13
10
|
return (
|
|
14
|
-
<div className="min-h-screen bg-
|
|
11
|
+
<div className="min-h-screen bg-gray-50 flex">
|
|
15
12
|
{/* Sidebar */}
|
|
16
13
|
<Sidebar />
|
|
17
14
|
|
|
18
15
|
{/* Main content */}
|
|
19
16
|
<main className="flex-1 overflow-auto">
|
|
20
|
-
|
|
21
|
-
{children}
|
|
22
|
-
</div>
|
|
17
|
+
{children}
|
|
23
18
|
</main>
|
|
24
19
|
</div>
|
|
25
20
|
)
|