container.tsx 690 B

123456789101112131415161718192021222324
  1. import React, { PropsWithChildren } from "react";
  2. type Props = PropsWithChildren<{
  3. title?: string;
  4. description?: string;
  5. }>;
  6. export const Container = ({ title, description, children }: Props) => {
  7. return (
  8. <div className="border border-grey-20 rounded-rounded bg-white py-6 px-8 flex flex-col mb-base relative">
  9. <div>
  10. <div className="flex items-center justify-between">
  11. {title && (
  12. <h2 className="text-[24px] leading-9 font-semibold">{title}</h2>
  13. )}
  14. </div>
  15. {description && (
  16. <p className="text-sm text-gray-500 mt-2">{description}</p>
  17. )}
  18. </div>
  19. <div>{children}</div>
  20. </div>
  21. );
  22. };