styled.ts 616 B

12345678910111213141516171819202122232425262728
  1. import styled, { css } from 'styled-components';
  2. export const Container = 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 =>
  16. props.isHidden
  17. ? css`
  18. transform: translate(0, -60px);
  19. `
  20. : css`
  21. transform: translate(0, 0);
  22. `}
  23. `;
  24. export default Container;