|
3 | 3 | import useUI from '@austinserb/react-zero-ui'; |
4 | 4 | import { useRenderTracker } from './ReactTracker'; |
5 | 5 |
|
6 | | -export function TestComponent() { |
| 6 | +export function TestComponentZero() { |
7 | 7 | const ref = useRenderTracker('TestComponent'); |
8 | 8 | const [, setTheme] = useUI<'light' | 'dark'>('theme', 'light'); |
9 | 9 | const [, setAccent] = useUI<'violet' | 'emerald' | 'amber'>('accent', 'violet'); |
@@ -112,13 +112,13 @@ function InteractiveCard({ toggleMenu }: { toggleMenu: () => void }) { |
112 | 112 | aria-label="button" |
113 | 113 | onClick={toggleMenu} |
114 | 114 | className="accent-violet:bg-violet-500 accent-emerald:bg-emerald-500 accent-amber:bg-amber-500 w-full rounded-lg py-3 font-medium text-white hover:scale-[1.02]"> |
115 | | - <span className="menu-open-true:hidden">Close Panel</span> |
116 | | - <span className="menu-open-false:hidden">Open Panel</span> |
| 115 | + <span className="menu-open-false:hidden">Close Panel</span> |
| 116 | + <span className="menu-open-true:hidden">Open Panel</span> |
117 | 117 | </button> |
118 | 118 | </div> |
119 | 119 |
|
120 | 120 | {/* Sliding Panel */} |
121 | | - <div className="menu-open-true:max-h-[160px] menu-open-false:max-h-0 overflow-hidden"> |
| 121 | + <div className="menu-open-true:max-h-[80px] menu-open-false:max-h-0 overflow-hidden"> |
122 | 122 | <div className="theme-dark:bg-gray-700 theme-light:bg-white border-t border-gray-200 p-6 transition-all duration-0!"> |
123 | 123 | <p className="theme-dark:text-gray-300 theme-light:text-gray-600">✨ This panel slides open without re-rendering!</p> |
124 | 124 | </div> |
@@ -146,8 +146,8 @@ function StateDisplay() { |
146 | 146 | </div> |
147 | 147 | <div className="flex gap-1 text-nowrap **:text-nowrap"> |
148 | 148 | menu: |
149 | | - <span className="menu-open-true:hidden">Open</span> |
150 | | - <span className="menu-open-false:hidden">Closed</span> |
| 149 | + <span className="menu-open-false:hidden">Open</span> |
| 150 | + <span className="menu-open-true:hidden">Closed</span> |
151 | 151 | </div> |
152 | 152 | </div> |
153 | 153 | </div> |
|
0 commit comments