index.tsx 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. 'use client'
  2. import type { FC } from 'react'
  3. import React from 'react'
  4. import s from './style.module.css'
  5. export type IWarningMaskProps = {
  6. title: string
  7. description: string
  8. footer: React.ReactNode
  9. }
  10. const warningIcon = (
  11. <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  12. <path d="M9.99996 13.3334V10.0001M9.99996 6.66675H10.0083M18.3333 10.0001C18.3333 14.6025 14.6023 18.3334 9.99996 18.3334C5.39759 18.3334 1.66663 14.6025 1.66663 10.0001C1.66663 5.39771 5.39759 1.66675 9.99996 1.66675C14.6023 1.66675 18.3333 5.39771 18.3333 10.0001Z" stroke="#F79009" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
  13. </svg>
  14. )
  15. const WarningMask: FC<IWarningMaskProps> = ({
  16. title,
  17. description,
  18. footer,
  19. }) => {
  20. return (
  21. <div className={`${s.mask} absolute z-10 inset-0 pt-16`}
  22. >
  23. <div className='mx-auto w-[535px]'>
  24. <div className={`${s.icon} flex items-center justify-center w-11 h-11 rounded-xl bg-white`}>{warningIcon}</div>
  25. <div className='mt-4 text-[24px] leading-normal font-semibold text-gray-800'>
  26. {title}
  27. </div>
  28. <div className='mt-3 text-base text-gray-500'>
  29. {description}
  30. </div>
  31. <div className='mt-6'>
  32. {footer}
  33. </div>
  34. </div>
  35. </div>
  36. )
  37. }
  38. export default React.memo(WarningMask)