forked from github/plane
e4f48d6878
* chore: emoji-picker-react package added * chore: emoji and emoji picker component added * chore: emoji picker custom style added * chore: migration of the emoji's * chore: migration changes * chore: project logo prop * chore: added logo props in the serializer * chore: removed unused keys * chore: implement emoji picker throughout the web app * style: emoji icon picker * chore: update project logo renderer in the space app * chore: migrations fixes --------- Co-authored-by: Anmol Singh Bhatia <anmolsinghbhatia@plane.so> Co-authored-by: NarayanBavisetti <narayan3119@gmail.com>
35 lines
786 B
TypeScript
35 lines
786 B
TypeScript
// helpers
|
|
import { cn } from "helpers/common.helper";
|
|
// types
|
|
import { TProjectLogoProps } from "@plane/types";
|
|
|
|
type Props = {
|
|
className?: string;
|
|
logo: TProjectLogoProps;
|
|
};
|
|
|
|
export const ProjectLogo: React.FC<Props> = (props) => {
|
|
const { className, logo } = props;
|
|
|
|
if (logo.in_use === "icon" && logo.icon)
|
|
return (
|
|
<span
|
|
style={{
|
|
color: logo.icon.color,
|
|
}}
|
|
className={cn("material-symbols-rounded text-base", className)}
|
|
>
|
|
{logo.icon.name}
|
|
</span>
|
|
);
|
|
|
|
if (logo.in_use === "emoji" && logo.emoji)
|
|
return (
|
|
<span className={cn("text-base", className)}>
|
|
{logo.emoji.value?.split("-").map((emoji) => String.fromCodePoint(parseInt(emoji, 10)))}
|
|
</span>
|
|
);
|
|
|
|
return <span />;
|
|
};
|