styled.ts 547 B

1234567891011121314151617181920212223
  1. import styled, { css } from 'styled-components';
  2. export const Wrapper = styled('div')<{isHidden: boolean}>`
  3. position: fixed;
  4. top: 0;
  5. height: 60px;
  6. width: 100%;
  7. box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12);
  8. border: solid 1px rgba(0, 0, 0, 0.12);
  9. display: flex;
  10. align-items: center;
  11. padding: 0 24px;
  12. background-color: white;
  13. z-index: 100;
  14. transition: transform 225ms cubic-bezier(0, 0, 0.2, 1) 0ms;
  15. ${props => (props.isHidden ? css`
  16. transform: translate(0, -60px);
  17. ` : css`
  18. transform: translate(0, 0);
  19. `)}
  20. `;