/
githubmirror
/
pixijs
Обзор
Документация
Войти
/
githubmirror
/
pixijs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
playground/src/panels/Panel.tsx
36 строк
1 KB
Mat Groves
chore: Add PixiJS development playground (#11878)
12 фев 2026, 18:26
Не верифицирован
12 фев 2026, 18:26
d0c73cf
Код
Авторство
О чём код?
import type { ComponentChildren } from 'preact'; interface PanelProps { expanded: boolean; children: ComponentChildren; } export function Panel({ expanded, children }: PanelProps) { return ( <div style={{ position: 'fixed', top: '50px', left: '10px', width: '280px', maxHeight: 'calc(100vh - 60px)', background: '#0c0c14', border: '1px solid #1a1a28', borderRadius: '8px', zIndex: 999, display: 'flex', flexDirection: 'column', fontFamily: 'system-ui, sans-serif', fontSize: '13px', color: '#dcdce8', boxShadow: '0 4px 24px rgba(0,0,0,0.5)', pointerEvents: expanded ? 'auto' : 'none', opacity: expanded ? 1 : 0, transform: expanded ? 'translateX(0)' : 'translateX(-16px)', transition: 'opacity 0.2s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1)', }}> {children} </div> ); }