kgabryje commented on code in PR #31575:
URL: https://github.com/apache/superset/pull/31575#discussion_r1908620818


##########
superset-frontend/src/components/Label/index.tsx:
##########
@@ -71,49 +75,57 @@ export default function Label(props: LabelProps) {
     info,
   } = colors;
 
-  let backgroundColor = grayscale.light3;
-  let backgroundColorHover = onClick ? primary.light2 : grayscale.light3;
-  let borderColor = onClick ? grayscale.light2 : 'transparent';
-  let borderColorHover = onClick ? primary.light1 : 'transparent';
-  let color = grayscale.dark1;
+  let baseColor;
+  if (type === 'default') {
+    baseColor = grayscale;
+  } else if (type === 'success') {
+    baseColor = success;
+  } else if (type === 'alert') {
+    baseColor = alert;
+  } else if (type === 'warning') {
+    baseColor = warning;
+  } else if (type === 'danger') {
+    baseColor = error;
+  } else if (type === 'info') {
+    baseColor = info;
+  } else if (type === 'secondary') {
+    baseColor = secondary;
+  } else {
+    baseColor = primary;
+  }
+  let color = baseColor.dark2;
+  let borderColor = baseColor.light1;
+  let backgroundColor = baseColor.light2;
+  let backgroundColorHover = onClick ? baseColor.light1 : backgroundColor;
+  let borderColorHover = onClick ? baseColor.base : borderColor;
 
-  if (type !== 'default') {
-    color = grayscale.light4;
+  // TODO - REMOVE IF BLOCK LOGIC WHEN shades are fixed to be aligned in terms 
of brightness
+  // currently shades for >=light2 are not aligned for primary, default and 
secondary
+  if (['default', 'primary', 'secondary'].includes(type)) {

Review Comment:
   Alright looks good for now 👍 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to