More chat list unread count tweaks
This commit is contained in:
parent
75248d8e2f
commit
755b549271
3 changed files with 12 additions and 6 deletions
|
@ -234,10 +234,11 @@ export const BaseConversationListItem: FunctionComponent<PropsType> = React.memo
|
|||
function UnreadCount({ count = 0 }: Readonly<{ count?: number }>) {
|
||||
return (
|
||||
<div
|
||||
className={classNames(
|
||||
`${BASE_CLASS_NAME}__unread-count`,
|
||||
count > 99 && `${BASE_CLASS_NAME}__unread-count--big`
|
||||
)}
|
||||
className={classNames(`${BASE_CLASS_NAME}__unread-count`, {
|
||||
[`${BASE_CLASS_NAME}__unread-count--multiple-digits`]:
|
||||
count > 9 && count <= 99,
|
||||
[`${BASE_CLASS_NAME}__unread-count--many`]: count > 99,
|
||||
})}
|
||||
>
|
||||
{Boolean(count) && Math.min(count, 99)}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue