{
className={`led-color-option ${pickerType?.type === 'pressed' ? 'selected' : ''}`}
onClick={() => handleLedColorClick('pressed')}
>
-
Pressed
+
{selectedButton?.startsWith('GRADIENT') ? 'Color 2' : 'Pressed'}
-
+
handleLedColorChange(c)}
disableAlpha={true}
- presetColors={LEDColors.map(c => ({ title: c.name, color: c.value}))}
+ presetColors={presetColors}
width={180}
/>
+
+
+
+
diff --git a/src/Services/Utilities.js b/src/Services/Utilities.js
index 2c29bca..a1f3397 100644
--- a/src/Services/Utilities.js
+++ b/src/Services/Utilities.js
@@ -5,7 +5,7 @@ const hexToInt = (hex) => {
// Convert a number to hex
const intToHex = (d) => {
- return ("0"+(Number(d).toString(16))).slice(-2).toUpperCase();
+ return ("0"+(Number(d).toString(16))).slice(-2).toLowerCase();
};
// Convert a 32-bit ARGB value to hex format (no # prefix)
@@ -32,8 +32,8 @@ const rgbArrayToHex = (values) => {
};
export {
- intToHex,
hexToInt,
+ intToHex,
rgbArrayToHex,
rgbIntToHex,
};
diff --git a/src/index.scss b/src/index.scss
index efc25f3..85da99a 100644
--- a/src/index.scss
+++ b/src/index.scss
@@ -53,7 +53,7 @@ input.form-control {
}
.popover {
- position: absolute;
+ position: fixed !important;
z-index: 2;
.cover {
@@ -62,3 +62,11 @@ input.form-control {
}
}
+.button-group {
+ display: flex;
+ justify-content: flex-start;
+
+ button:not(:first-child) {
+ margin-left: 10px;
+ }
+}