您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516171819202122232425262728
  1. 'use client'
  2. import type { FC } from 'react'
  3. import React from 'react'
  4. import cn from '@/utils/classnames'
  5. type Props = {
  6. label: string
  7. description?: string
  8. }
  9. const Label: FC<Props> = ({
  10. label,
  11. description,
  12. }) => {
  13. return (
  14. <div>
  15. <div className={cn('flex h-6 items-center', description && 'h-4')}>
  16. <span className='system-sm-semibold text-text-secondary'>{label}</span>
  17. </div>
  18. {description && (
  19. <div className='body-xs-regular mt-1 text-text-tertiary'>
  20. {description}
  21. </div>
  22. )}
  23. </div>
  24. )
  25. }
  26. export default React.memo(Label)