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>
55 lines
1.4 KiB
TypeScript
55 lines
1.4 KiB
TypeScript
import type { JSXElementConstructor } from "react";
|
|
import React from "react";
|
|
import type { IconProps } from "constants/IconConstants";
|
|
import { IconWrapper } from "constants/IconConstants";
|
|
import { importRemixIcon } from "design-system-old";
|
|
|
|
const ShareIcon = importRemixIcon(
|
|
() => import("remixicon-react/ShareBoxFillIcon"),
|
|
);
|
|
const DeployIcon = importRemixIcon(
|
|
() => import("remixicon-react/Rocket2FillIcon"),
|
|
);
|
|
const FeedbackIcon = importRemixIcon(
|
|
() => import("remixicon-react/FeedbackFillIcon"),
|
|
);
|
|
const SaveFailureIcon = importRemixIcon(
|
|
() => import("remixicon-react/ErrorWarningFillIcon"),
|
|
);
|
|
const SaveSuccessIcon = importRemixIcon(
|
|
() => import("remixicon-react/CheckboxCircleFillIcon"),
|
|
);
|
|
/* eslint-disable react/display-name */
|
|
|
|
export const HeaderIcons: {
|
|
[id: string]: JSXElementConstructor<IconProps>;
|
|
} = {
|
|
SHARE: (props: IconProps) => (
|
|
<IconWrapper {...props}>
|
|
<ShareIcon />
|
|
</IconWrapper>
|
|
),
|
|
DEPLOY: (props: IconProps) => (
|
|
<IconWrapper {...props}>
|
|
<DeployIcon />
|
|
</IconWrapper>
|
|
),
|
|
FEEDBACK: (props: IconProps) => (
|
|
<IconWrapper {...props}>
|
|
<FeedbackIcon />
|
|
</IconWrapper>
|
|
),
|
|
SAVE_FAILURE: (props: IconProps) => (
|
|
<IconWrapper {...props}>
|
|
<SaveFailureIcon />
|
|
</IconWrapper>
|
|
),
|
|
SAVE_SUCCESS: (props: IconProps) => (
|
|
<IconWrapper {...props}>
|
|
<SaveSuccessIcon />
|
|
</IconWrapper>
|
|
),
|
|
};
|
|
|
|
export type HeaderIconName = keyof typeof HeaderIcons;
|