PageHeading.tsx 618 B

123456789101112131415161718192021222324252627282930313233
  1. import styled from 'styled-components';
  2. import React, { PropsWithChildren } from 'react';
  3. import Heading from 'components/common/heading/Heading.styled';
  4. interface Props {
  5. text: string;
  6. className?: string;
  7. }
  8. const PageHeading: React.FC<PropsWithChildren<Props>> = ({
  9. text,
  10. className,
  11. children,
  12. }) => {
  13. return (
  14. <div className={className}>
  15. <Heading>{text}</Heading>
  16. <div>{children}</div>
  17. </div>
  18. );
  19. };
  20. export default styled(PageHeading)`
  21. display: flex;
  22. justify-content: space-between;
  23. align-items: center;
  24. padding: 16px;
  25. & > div {
  26. display: flex;
  27. gap: 16px;
  28. }
  29. `;