All files / src/Drawer styles.ts

100% Statements 4/4
68.75% Branches 11/16
100% Functions 2/2
100% Lines 2/2

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52      20x                                                                                     20x          
import { css, cssClass } from '../styled';
import { altitude, theme } from '../utils';
 
export const Drawer = styleProps => cssClass`
  && {
    position: fixed;
    background-color: white;
 
    ${styleProps.placement === 'left' &&
      css`
        left: 0;
      `}
 
    ${styleProps.placement === 'right' &&
      css`
        right: 0;
      `}
 
    ${styleProps.placement === 'top' &&
      css`
        top: 0;
      `}
 
    ${styleProps.placement === 'bottom' &&
      css`
        bottom: 0;
      `}
 
    ${(styleProps.placement === 'left' || styleProps.placement === 'right' || styleProps.isFullScreen) &&
      css`
        height: 100vh;
      `}
 
    ${(styleProps.placement === 'top' || styleProps.placement === 'bottom' || styleProps.isFullScreen) &&
      css`
        width: 100%;
      `}
  }
 
  ${altitude('300')(styleProps)};
 
  & {
    ${theme(styleProps.themeKey, `css.root`)(styleProps)};
  }
`;
 
export const DrawerDisclosure = styleProps => cssClass`
  & {
    ${theme(styleProps.themeKey, `css.root`)(styleProps)};
  }
`;