pageHeading.tsx 511 B

123456789101112131415161718192021
  1. import styled from '@emotion/styled';
  2. import space from 'app/styles/space';
  3. type Props = {
  4. children: React.ReactNode;
  5. className?: string;
  6. withMargins?: boolean;
  7. };
  8. const PageHeading = styled('h1')<Props>`
  9. color: ${p => p.theme.textColor};
  10. font-size: ${p => p.theme.headerFontSize};
  11. line-height: ${p => p.theme.headerFontSize};
  12. font-weight: normal;
  13. margin: 0;
  14. margin-bottom: ${p => p.withMargins && space(3)};
  15. margin-top: ${p => p.withMargins && space(1)};
  16. `;
  17. export default PageHeading;