forked from github/plane
chore: project emoji icon improvement (#3837)
This commit is contained in:
parent
9326fb0762
commit
62693abb09
@ -53,7 +53,7 @@ const EmojiIconPicker: React.FC<Props> = (props) => {
|
|||||||
<Popover.Button
|
<Popover.Button
|
||||||
ref={buttonRef}
|
ref={buttonRef}
|
||||||
onClick={() => setIsOpen((prev) => !prev)}
|
onClick={() => setIsOpen((prev) => !prev)}
|
||||||
className="outline-none"
|
className="outline-none flex items-center justify-center"
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
>
|
>
|
||||||
{label}
|
{label}
|
||||||
|
@ -30,7 +30,7 @@ export const renderEmoji = (
|
|||||||
|
|
||||||
if (typeof emoji === "object")
|
if (typeof emoji === "object")
|
||||||
return (
|
return (
|
||||||
<span style={{ color: emoji.color }} className="material-symbols-rounded !text-sm">
|
<span style={{ fontSize: "16px", color: emoji.color }} className="material-symbols-rounded">
|
||||||
{emoji.name}
|
{emoji.name}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
@ -41,16 +41,13 @@ export const groupReactions: (reactions: any[], key: string) => { [key: string]:
|
|||||||
reactions: any,
|
reactions: any,
|
||||||
key: string
|
key: string
|
||||||
) => {
|
) => {
|
||||||
const groupedReactions = reactions.reduce(
|
const groupedReactions = reactions.reduce((acc: any, reaction: any) => {
|
||||||
(acc: any, reaction: any) => {
|
if (!acc[reaction[key]]) {
|
||||||
if (!acc[reaction[key]]) {
|
acc[reaction[key]] = [];
|
||||||
acc[reaction[key]] = [];
|
}
|
||||||
}
|
acc[reaction[key]].push(reaction);
|
||||||
acc[reaction[key]].push(reaction);
|
return acc;
|
||||||
return acc;
|
}, {} as { [key: string]: any[] });
|
||||||
},
|
|
||||||
{} as { [key: string]: any[] }
|
|
||||||
);
|
|
||||||
|
|
||||||
return groupedReactions;
|
return groupedReactions;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user