graycoreio/daffodil

View on GitHub
libs/design/sidebar/src/animation/sidebar-animation-width.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { DaffSidebarSide } from '../helper/sidebar-side';

export const getSidebarAnimationWidth =
  (side: DaffSidebarSide, width: number): string => side === 'left' ? -1 * width + 'px' : width + 'px';