You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/09/02 19:20:28 UTC

[GitHub] [incubator-superset] suddjian commented on a change in pull request #10722: More Label touchups (margins)

suddjian commented on a change in pull request #10722:
URL: https://github.com/apache/incubator-superset/pull/10722#discussion_r482329816



##########
File path: superset-frontend/src/components/Label/index.tsx
##########
@@ -103,9 +114,12 @@ export default function Label(props: LabelProps) {
     bsStyle: officialBootstrapStyles.includes(props.bsStyle || '')
       ? props.bsStyle
       : 'default',
-    className: officialBootstrapStyles.includes(props.bsStyle || '')
-      ? undefined
-      : `label-${props.bsStyle}`,
+    className: cx({
+      [`${props.className}`]: props.className,

Review comment:
       You can also do `cx(props.className, { [label]: condition })`




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org