card.tsx 595 B

12345678910111213141516171819
  1. import React from 'react'
  2. import { useTranslation } from 'react-i18next'
  3. import s from './card.module.css'
  4. type PropType = {
  5. children: React.ReactNode
  6. text?: string
  7. }
  8. function Card({ children, text }: PropType) {
  9. const { t } = useTranslation()
  10. return (
  11. <div className={`${s.card} box-border w-full flex flex-col items-start px-4 py-3 rounded-lg border-solid border border-gray-200 cursor-pointer hover:border-primary-300`}>
  12. <div className='text-gray-400 font-medium text-xs mb-2'>{text ?? t('share.chat.powerBy')}</div>
  13. {children}
  14. </div>
  15. )
  16. }
  17. export default Card