buildStep.tsx 1022 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import * as React from 'react';
  2. import styled from '@emotion/styled';
  3. import ListItem from 'app/components/list/listItem';
  4. import space from 'app/styles/space';
  5. type Props = {
  6. title: string;
  7. description: string;
  8. children: React.ReactNode;
  9. };
  10. function BuildStep({title, description, children}: Props) {
  11. return (
  12. <StyledListItem>
  13. <Header>
  14. <Description>{title}</Description>
  15. <SubDescription>{description}</SubDescription>
  16. </Header>
  17. <Content>{children}</Content>
  18. </StyledListItem>
  19. );
  20. }
  21. export default BuildStep;
  22. const StyledListItem = styled(ListItem)`
  23. display: grid;
  24. grid-gap: ${space(2)};
  25. `;
  26. const Description = styled('h4')`
  27. font-weight: 400;
  28. margin-bottom: 0;
  29. `;
  30. const SubDescription = styled('div')`
  31. color: ${p => p.theme.gray300};
  32. font-size: ${p => p.theme.fontSizeMedium};
  33. `;
  34. const Header = styled('div')`
  35. display: grid;
  36. grid-gap: ${space(0.5)};
  37. `;
  38. const Content = styled('div')`
  39. display: grid;
  40. grid-template-columns: 1fr max-content;
  41. `;