PromucFlow_constructor/app/client/src/icons/HelpIcons.tsx
Satish Gandham 83538ad74d
feat: Bundle optimization and first load improvements (#21667)
Co-authored-by: Ivan Akulov <mail@iamakulov.com>
Co-authored-by: Satish Gandham <hello@satishgandham.com>
Co-authored-by: Ivan Akulov <iamakulov@outlook.com>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
Co-authored-by: somangshu <somangshu.goswami1508@gmail.com>
2023-05-11 10:56:03 +05:30

81 lines
2.1 KiB
TypeScript

import type { JSXElementConstructor } from "react";
import React from "react";
import type { IconProps } from "constants/IconConstants";
import { IconWrapper } from "constants/IconConstants";
import { Icon } from "@blueprintjs/core";
import { importRemixIcon, importSvg } from "design-system-old";
const UpdatesIcon = importSvg(() => import("assets/icons/help/updates.svg"));
const GithubIcon = importRemixIcon(
() => import("remixicon-react/GithubFillIcon"),
);
const DocumentIcon = importRemixIcon(
() => import("remixicon-react/FileTextFillIcon"),
);
const HelpIcon = importRemixIcon(
() => import("remixicon-react/QuestionMarkIcon"),
);
const DiscordIcon = importRemixIcon(
() => import("remixicon-react/DiscordFillIcon"),
);
const OpenLinkIcon = importRemixIcon(
() => import("remixicon-react/ShareBoxLineIcon"),
);
const FileCopyLineIcon = importRemixIcon(
() => import("remixicon-react/FileCopyLineIcon"),
);
/* eslint-disable react/display-name */
export const HelpIcons: {
[id: string]: JSXElementConstructor<IconProps>;
} = {
OPEN_LINK: (props: IconProps) => (
<IconWrapper {...props}>
<OpenLinkIcon />
</IconWrapper>
),
DOCUMENT: (props: IconProps) => (
<IconWrapper {...props}>
<DocumentIcon />
</IconWrapper>
),
HELP_ICON: (props: IconProps) => (
<IconWrapper {...props}>
<HelpIcon />
</IconWrapper>
),
CLOSE_ICON: (props: IconProps) => (
<IconWrapper {...props}>
<Icon icon={"cross"} />
</IconWrapper>
),
GITHUB: (props: IconProps) => (
<IconWrapper {...props}>
<GithubIcon />
</IconWrapper>
),
CHAT: (props: IconProps) => (
<IconWrapper {...props}>
<Icon icon={"chat"} />
</IconWrapper>
),
DISCORD: (props: IconProps) => (
<IconWrapper {...props}>
<DiscordIcon />
</IconWrapper>
),
UPDATES: (props: IconProps) => (
<IconWrapper {...props}>
<UpdatesIcon />
</IconWrapper>
),
COPY_ICON: (props: IconProps) => (
<IconWrapper {...props}>
<FileCopyLineIcon />
</IconWrapper>
),
};
export type HelpIconName = keyof typeof HelpIcons;