diff --git a/datahub-web-react/package.json b/datahub-web-react/package.json index 5fabf473938e6..fa71d609a33f7 100644 --- a/datahub-web-react/package.json +++ b/datahub-web-react/package.json @@ -78,7 +78,6 @@ "react-syntax-highlighter": "^15.4.4", "react-timezone-select": "^1.1.15", "react-visibility-sensor": "^5.1.1", - "rgb-hex": "^4.0.0", "sinon": "^11.1.1", "start-server-and-test": "1.12.2", "styled-components": "^5.2.1", diff --git a/datahub-web-react/src/app/shared/TagStyleEntity.tsx b/datahub-web-react/src/app/shared/TagStyleEntity.tsx index 824080ce7b907..1389a5a4408d5 100644 --- a/datahub-web-react/src/app/shared/TagStyleEntity.tsx +++ b/datahub-web-react/src/app/shared/TagStyleEntity.tsx @@ -6,8 +6,6 @@ import { ApolloError } from '@apollo/client'; import styled from 'styled-components'; import { ChromePicker } from 'react-color'; import ColorHash from 'color-hash'; -import rgbHex from 'rgb-hex'; - import { PlusOutlined } from '@ant-design/icons'; import { useGetTagQuery } from '../../graphql/tag.generated'; import { EntityType, FacetMetadata, Maybe, Scalars } from '../../types.generated'; @@ -258,6 +256,10 @@ export default function TagStyleEntity({ urn, useGetSearchResults = useWrappedSe saveColor(); }; + const handleColorChange = (color: any) => { + setColorValue(color?.hex); + }; + // Update Description const updateDescriptionValue = (desc: string) => { setUpdatedDescription(desc); @@ -312,10 +314,7 @@ export default function TagStyleEntity({ urn, useGetSearchResults = useWrappedSe {displayColorPicker && ( - setColorValue(`#${rgbHex(c.rgb.r, c.rgb.g, c.rgb.b, c.rgb.a)}`)} - /> + )} diff --git a/datahub-web-react/yarn.lock b/datahub-web-react/yarn.lock index 8a3066b9996f6..61b537ceb453e 100644 --- a/datahub-web-react/yarn.lock +++ b/datahub-web-react/yarn.lock @@ -14722,11 +14722,6 @@ rework@1.0.1: convert-source-map "^0.3.3" css "^2.0.0" -rgb-hex@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/rgb-hex/-/rgb-hex-4.0.0.tgz#02fb1e215e3fe5d070501579a3d2e4fa3c0acec8" - integrity sha512-Eg2ev5CiMBnQ9Gpflmqbwbso0CCdISqtVIow7OpYSLN1ULUv2jTB9YieS1DSSn/17AD7KkPWDPzSFzI4GSuu/Q== - rgb-regex@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/rgb-regex/-/rgb-regex-1.0.1.tgz#c0e0d6882df0e23be254a475e8edd41915feaeb1"