1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-27 10:32:58 +02:00
joplin/packages/app-desktop/gui/Sidebar/listItemComponents/NoteCount.tsx

16 lines
407 B
TypeScript
Raw Normal View History

import * as React from 'react';
import { _n } from '@joplin/lib/locale';
interface Props {
count: number;
}
const NoteCount: React.FC<Props> = props => {
const count = props.count;
const title = _n('Contains %d note', 'Contains %d notes', count, count);
return count ? <div role='note' aria-label={title} title={title} className="note-count-label">{count}</div> : null;
};
export default NoteCount;