Skip to content

Commit

Permalink
chore: update Popup from bricks
Browse files Browse the repository at this point in the history
  • Loading branch information
asabotovich committed May 21, 2024
1 parent 68bd9a6 commit f446942
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/Reactions/Reactions.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { Popup, nullable } from '@taskany/bricks';
import { nullable } from '@taskany/bricks';
import { Tooltip } from '@taskany/bricks/harmony';

import { ReactionsMap } from '../../types/reactions';
import { ReactionsButton } from '../ReactionsButton';
Expand All @@ -20,17 +21,16 @@ export const Reactions = React.memo(({ reactions, children, onClick }: Reactions
{nullable(reactions, (reactionsMap) =>
Object.entries(reactionsMap).map(([reaction, { authors, count, remains }]) => {
return (
<Popup
<Tooltip
key={reaction}
target={<ReactionsButton emoji={reaction} count={count} onClick={onClick} />}
tooltip
offset={[0, 8]}
maxWidth={300}
placement="top"
>
{authors.map(({ name }) => name).join(', ')}
{nullable(remains, (count) => tr.raw('and {count} more', { count }))}
</Popup>
</Tooltip>
);
}),
)}
Expand Down

0 comments on commit f446942

Please sign in to comment.