design: карточки устройств — стеклянное off-состояние + интерактивность
All checks were successful
Deploy / deploy (push) Successful in 2m2s

This commit is contained in:
d.klimov
2026-07-22 23:27:20 +03:00
parent 2755980165
commit d9735d6b71

View File

@@ -92,9 +92,11 @@ export default function DeviceCard({
const activeGlow = `color-mix(in srgb, ${accent} 22%, transparent)` const activeGlow = `color-mix(in srgb, ${accent} 22%, transparent)`
return ( return (
<div style={{ <div className="card-interactive" style={{
background: isOn ? activeBg : 'var(--surface-1)', background: isOn
border: `1px solid ${isOn ? activeBorder : 'var(--border-subtle)'}`, ? activeBg
: 'linear-gradient(155deg, color-mix(in srgb, var(--surface-3) 92%, transparent), color-mix(in srgb, var(--surface-1) 88%, transparent))',
border: `1px solid ${isOn ? activeBorder : 'rgba(160,168,255,0.14)'}`,
borderRadius: 22, borderRadius: 22,
padding: '20px 18px 18px', padding: '20px 18px 18px',
minHeight: 160, minHeight: 160,
@@ -102,7 +104,11 @@ export default function DeviceCard({
flexDirection: 'column', flexDirection: 'column',
justifyContent: 'space-between', justifyContent: 'space-between',
transition: 'all 0.35s cubic-bezier(0.4, 0, 0.2, 1)', transition: 'all 0.35s cubic-bezier(0.4, 0, 0.2, 1)',
boxShadow: isOn ? `0 8px 32px -12px ${activeGlow}` : 'var(--shadow-sm)', boxShadow: isOn
? `0 12px 36px -12px ${activeGlow}, inset 0 1px 0 rgba(255,255,255,0.08)`
: 'var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.08)',
WebkitBackdropFilter: 'blur(16px)',
backdropFilter: 'blur(16px)',
position: 'relative', position: 'relative',
overflow: 'hidden', overflow: 'hidden',
opacity: isMock ? 0.88 : 1, opacity: isMock ? 0.88 : 1,