github
1394 of 2532 branches covered (55.06%)
27 of 1620 new or added lines in 60 files covered. (1.67%)
4 existing lines in 2 files now uncovered.14588 of 68702 relevant lines covered (21.23%)
2.02 hits per line
NEW
|
import { cn } from '@teable/ui-lib'; |
|
NEW
|
import { useTranslation } from '../../context/app/i18n'; |
× |
NEW
|
|
× |
NEW
|
interface IRecordItemProps { |
× |
NEW
|
title?: string;
|
× |
NEW
|
active?: boolean; |
× |
NEW
|
} |
× |
NEW
|
|
× |
NEW
|
export const RecordItem = (props: IRecordItemProps) => { |
× |
NEW
|
const { active, title } = props;
|
× |
NEW
|
const { t } = useTranslation();
|
× |
NEW
|
|
× |
NEW
|
return (
|
× |
NEW
|
<div |
× |
NEW
|
tabIndex={-1}
|
× |
NEW
|
role={'button'} |
× |
NEW
|
className={cn( |
× |
NEW
|
'group relative w-full cursor-pointer truncate rounded-md border border-input px-4 py-2 shadow-sm', |
× |
NEW
|
{ |
× |
NEW
|
'border-l-8 border-l-foreground': active, |
× |
NEW
|
} |
× |
NEW
|
)} |
× |
NEW
|
> |
× |
NEW
|
<div |
× |
NEW
|
className="w-full truncate font-mono text-sm"
|
× |
NEW
|
title={title?.replaceAll('\n', ' ') || t('common.unnamedRecord')} |
× |
NEW
|
> |
× |
NEW
|
{title?.replaceAll('\n', ' ') || t('common.unnamedRecord')} |
× |
NEW
|
</div> |
× |
NEW
|
</div> |
× |
NEW
|
); |
× |
NEW
|
}; |
× |