All files / app/src/entities/change-log/ui/change-log-status change-log-status.tsx

100% Statements 8/8
50% Branches 1/2
100% Functions 1/1
100% Lines 8/8

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 181x                 1x 1x 1x 1x 1x 1x   1x  
import { FCWithClassName } from '@tmk/ui-kit'
import { useTranslate } from '@/shared/lib'
import cn from 'classnames'
import { ChangeLogStatusEnum, getChangeLogStatusStyle } from '../../lib'
 
export interface ChangeLogStatusProps {
  status: ChangeLogStatusEnum
}
 
export const ChangeLogStatus: FCWithClassName<ChangeLogStatusProps> = ({ status, className }) => {
  const { t } = useTranslate(['accounting-object'])
  return (
    <div className={cn('rounded-base py-1 px-2 text-min-semibold w-fit', getChangeLogStatusStyle(status), className)}>
      {status ? t(status) : '-'}
    </div>
  )
}