info-panel.tsx 585 B

123456789101112131415161718192021222324252627
  1. 'use client'
  2. import type { FC } from 'react'
  3. import React from 'react'
  4. type Props = {
  5. title: string
  6. content: string | JSX.Element
  7. }
  8. const InfoPanel: FC<Props> = ({
  9. title,
  10. content,
  11. }) => {
  12. return (
  13. <div>
  14. <div className='px-[5px] py-[3px] bg-gray-100 rounded-md'>
  15. <div className='leading-4 text-[10px] font-medium text-gray-500 uppercase'>
  16. {title}
  17. </div>
  18. <div className='leading-4 text-xs font-normal text-gray-700 break-words'>
  19. {content}
  20. </div>
  21. </div>
  22. </div>
  23. )
  24. }
  25. export default React.memo(InfoPanel)