PromucFlow_constructor/app/client/src/icons/FormIcons.tsx
Abhinav Jha 543b7ec72d
Entity Explorer Render (#1354)
* WIP: Performance improvements in entity explorer

* WIP: Achieve feature parity for entity explorer with release

* Update unit tests

* Add sentry profiling to current page entity properties component

* Fix page add/delete not showing up on entity explorer issue. Update memoization logic for pagegroup entity

* Deal with the ban-ts-ignore eslint issues

* Update unit tests

* Fix widget entity children visibility

* Fix tests and code

* Fix tests for scenarios where the collapsed entities are unmount, as this is a part of the performance optimization

* Filter undefined children when generating structureDSL

* Remove rule from eslintrc

Consolidate createPage test command

* Update CreatePage tests to remove redundant dsl updates

* Revert CreatePage test changes, as adding more checks within this command globally causes other tests to have issues.

* re-enable eslint rule, as without it CI tests fail

* Revert to ban-ts-comment

* Fix typescript ban-ts-ignore issue by upgrading react-scripts and fixing typescript issue across the application

* Typescript errors handled

Co-authored-by: vicky-primathon.in <vicky.bansal@primathon.in>
2020-11-03 18:35:40 +05:30

60 lines
1.8 KiB
TypeScript

import React, { CSSProperties, JSXElementConstructor } from "react";
import { Icon } from "@blueprintjs/core";
import { IconNames } from "@blueprintjs/icons";
import { IconProps, IconWrapper } from "constants/IconConstants";
import { ReactComponent as InfoIcon } from "assets/icons/form/info-outline.svg";
import { ReactComponent as DeleteIcon } from "assets/icons/form/trash.svg";
import { ReactComponent as AddNewIcon } from "assets/icons/form/add-new.svg";
import { ReactComponent as LockIcon } from "assets/icons/form/lock.svg";
/* eslint-disable react/display-name */
export const FormIcons: {
[id: string]: JSXElementConstructor<IconProps & { style?: CSSProperties }>;
} = {
INFO_ICON: (props: IconProps) => (
<IconWrapper {...props}>
<InfoIcon />
</IconWrapper>
),
HOME_ICON: (props: IconProps) => (
<IconWrapper {...props}>
<Icon icon={IconNames.HOME} color={props.color} iconSize={props.height} />
</IconWrapper>
),
DELETE_ICON: (props: IconProps) => (
<IconWrapper {...props}>
<DeleteIcon />
</IconWrapper>
),
ADD_NEW_ICON: (props: IconProps) => (
<IconWrapper {...props}>
<AddNewIcon />
</IconWrapper>
),
CREATE_NEW_ICON: (props: IconProps) => (
<IconWrapper {...props}>
<Icon icon={IconNames.PLUS} />
</IconWrapper>
),
PLUS_ICON: (props: IconProps) => (
<IconWrapper {...props}>
<Icon icon={IconNames.PLUS} color={props.color} iconSize={props.height} />
</IconWrapper>
),
SLASH_ICON: (props: IconProps) => (
<IconWrapper {...props}>
<Icon
icon={IconNames.SLASH}
color={props.color}
iconSize={props.height}
/>
</IconWrapper>
),
LOCK_ICON: (props: IconProps) => (
<IconWrapper {...props}>
<LockIcon />
</IconWrapper>
),
};