styled.ts 774 B

123456789101112131415161718192021222324252627282930
  1. import styled, { css } from 'styled-components';
  2. export const Container = styled('div')<{ showBottomBorder: boolean }>`
  3. display: inline-flex;
  4. flex-direction: column;
  5. width: 100%;
  6. ${(props) =>
  7. props.showBottomBorder
  8. ? css`
  9. border-bottom: 1px solid ${({ theme }) => theme.colors.black12};
  10. `
  11. : ''}
  12. `;
  13. export const Label = styled.span`
  14. padding: 8px;
  15. `;
  16. export const ContentWrapper = styled('div')<{ isCollapse: boolean }>`
  17. display: inline-block;
  18. transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1) 0ms;
  19. max-height: ${(props) => (props.isCollapse ? '0px' : '800px')};
  20. background-color: ${({ theme }) => theme.colors['hyper-light-gray']};
  21. overflow: hidden;
  22. `;
  23. export const Content = styled.div`
  24. padding: 10px;
  25. `;