Refine rail drawer switching and toggle animations
Build and Deploy Gateway / build-and-push (push) Successful in 21s
Build and Deploy Gateway / deploy (push) Successful in 7s

This commit is contained in:
2026-08-14 15:52:56 +03:00
parent a9eca0e9d4
commit 5a21a09b82
11 changed files with 215 additions and 90 deletions
+14 -4
View File
@@ -224,20 +224,30 @@ export function useDevicesFeature({
export type DevicesFeature = ReturnType<typeof useDevicesFeature>;
export function DevicesToggle({ feature, onToggle }: { feature: DevicesFeature; onToggle: () => void }) {
export function DevicesToggle({
feature,
open,
onToggle,
}: {
feature: DevicesFeature;
open: boolean;
onToggle: () => void;
}) {
return <RailAction
buttonRef={feature.toggleRef}
className="client-instructions-toggle client-devices-toggle"
open={feature.isOpen}
open={open}
controls="client-devices"
ariaLabel={feature.isOpen ? 'Закрыть устройства' : 'Устройства Gateway'}
ariaLabel={open ? 'Закрыть устройства' : 'Устройства Gateway'}
label="Устройства"
onClick={onToggle}
>
<svg viewBox="0 0 24 24" aria-hidden="true">
<rect className="client-rail-device-primary" x="3.5" y="5" width="7" height="10" rx="1.5" />
<rect className="client-rail-device-secondary" x="13.5" y="8" width="7" height="7" rx="1.5" />
<path className="client-rail-device-link" d="M6 19h12M7 15v4M17 15v4" />
<path className="client-rail-device-link" d="M7 15v4h3.5M17 15v4h-3.5" />
<path className="client-rail-device-bridge" d="M10.5 19h3" />
<path className="client-rail-device-pulse" pathLength="1" d="M7 19h10" />
</svg>
</RailAction>;
}