From 6f55daef0632bd5a42aa3b9b15059cc655e97457 Mon Sep 17 00:00:00 2001 From: Govind Kumar Date: Tue, 30 Jul 2024 14:58:38 +0530 Subject: [PATCH] fix(color-picker): use code for opaque image --- packages/assets/css/src/scss/_utils/_tokens.scss | 2 +- packages/ui/color-picker/src/color-picker.tsx | 6 +++--- packages/ui/color-picker/src/static/opaque.png | Bin 100 -> 0 bytes 3 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 packages/ui/color-picker/src/static/opaque.png diff --git a/packages/assets/css/src/scss/_utils/_tokens.scss b/packages/assets/css/src/scss/_utils/_tokens.scss index dc2f55418..05031720a 100644 --- a/packages/assets/css/src/scss/_utils/_tokens.scss +++ b/packages/assets/css/src/scss/_utils/_tokens.scss @@ -1,6 +1,6 @@ // Do not edit directly -// Generated on Mon, 29 Jul 2024 05:11:07 GMT +// Generated on Tue, 30 Jul 2024 09:07:12 GMT $accordion-border-radius-sm: 10px; $advanced-banner-background: linear-gradient(90deg, #222 0%, #383323 48.96%, #514524 100%); diff --git a/packages/ui/color-picker/src/color-picker.tsx b/packages/ui/color-picker/src/color-picker.tsx index aabd738d3..8a7b3ae90 100644 --- a/packages/ui/color-picker/src/color-picker.tsx +++ b/packages/ui/color-picker/src/color-picker.tsx @@ -5,8 +5,6 @@ import { ColorPickerProps } from "./color-picker.types" import { Button } from "@wpmudev/sui-button" import { Input } from "@wpmudev/sui-input" -const PreviewImage = require("./static/opaque.png") - import Picker from "./elements/picker" import { _renderHTMLPropsSafely, generateCN } from "@wpmudev/sui-utils" import { useOuterClick, useStyles } from "@wpmudev/sui-hooks" @@ -168,7 +166,9 @@ const ColorPicker: React.FC = ({ style={ tempColor ? { backgroundColor: tempColor } - : { backgroundImage: `url(${PreviewImage})` } + : { + backgroundImage: `url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAK0lEQVQ4y2P8//8/A25w7949PLJMDBSAUc0jQzML/jSkpKQ0GmCjminRDADJNQjBr5nbigAAAABJRU5ErkJggg==')`, + } } /> diff --git a/packages/ui/color-picker/src/static/opaque.png b/packages/ui/color-picker/src/static/opaque.png deleted file mode 100644 index 8ede4f053733be7005ff93be199889af5c821b99..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 100 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1SFYWcSQjyZBG}+5R22vfByfsXU;2lf6vxt ylMjzbL*Q9uXJhVvCQFtqF_B7GJWKN;55q}Qj)UuG-tGcwWAJqKb6Mw<&;$SwgdWKN