label.tsx 508 B

123456789101112131415161718192021222324252627
  1. 'use client'
  2. import type { FC } from 'react'
  3. import React from 'react'
  4. import cn from '@/utils/classnames'
  5. type Props = {
  6. isDeleted?: boolean,
  7. className?: string,
  8. text: string
  9. }
  10. const Label: FC<Props> = ({
  11. isDeleted,
  12. className,
  13. text,
  14. }) => {
  15. return (
  16. <div className={cn(
  17. 'shrink-0 w-[136px] system-xs-medium text-text-tertiary truncate',
  18. isDeleted && 'line-through text-text-quaternary',
  19. className,
  20. )}>
  21. {text}
  22. </div>
  23. )
  24. }
  25. export default React.memo(Label)