[WEB-2688] chore: added icons and splitted issue header (#6195)

* chore: added icons and splitted issue header

* fix: added ee filler component

* fix: component name fixed

* fix: removed dupes

* fix: casing
This commit is contained in:
Akshita Goyal 2024-12-13 13:31:13 +05:30 committed by GitHub
parent 77239ebcd4
commit b4112358ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 341 additions and 133 deletions

View file

@ -3,6 +3,7 @@
import { observer } from "mobx-react";
import { LucideIcon, Users } from "lucide-react";
// plane ui
import { cn } from "@plane/editor";
import { Avatar, AvatarGroup } from "@plane/ui";
// helpers
import { getFileURL } from "@/helpers/file.helper";
@ -13,17 +14,18 @@ type AvatarProps = {
showTooltip: boolean;
userIds: string | string[] | null;
icon?: LucideIcon;
size?: "sm" | "md" | "base" | "lg" | number;
};
export const ButtonAvatars: React.FC<AvatarProps> = observer((props) => {
const { showTooltip, userIds, icon: Icon } = props;
const { showTooltip, userIds, icon: Icon, size = "md" } = props;
// store hooks
const { getUserDetails } = useMember();
if (Array.isArray(userIds)) {
if (userIds.length > 0)
return (
<AvatarGroup size="md" showTooltip={!showTooltip}>
<AvatarGroup size={size} showTooltip={!showTooltip}>
{userIds.map((userId) => {
const userDetails = getUserDetails(userId);
@ -39,12 +41,12 @@ export const ButtonAvatars: React.FC<AvatarProps> = observer((props) => {
<Avatar
src={getFileURL(userDetails?.avatar_url ?? "")}
name={userDetails?.display_name}
size="md"
size={size}
showTooltip={!showTooltip}
/>
);
}
}
return Icon ? <Icon className="h-3 w-3 flex-shrink-0" /> : <Users className="h-3 w-3 mx-[4px] flex-shrink-0" />;
return Icon ? <Icon className="h-3 w-3 flex-shrink-0" /> : <Users className={cn("h-3 w-3 mx-[4px] flex-shrink-0")} />;
});

View file

@ -8,6 +8,8 @@ export type IssueEventProps = {
export type EventProps = {
eventName: string;
payload: any;
updates?: any;
path?: string;
};
export const getWorkspaceEventPayload = (payload: any) => ({