rusackas commented on code in PR #27558: URL: https://github.com/apache/superset/pull/27558#discussion_r1530561982
########## superset-frontend/src/explore/components/controls/OptionControls/index.tsx: ########## @@ -106,18 +106,46 @@ export const LabelsContainer = styled.div` export const DndLabelsContainer = styled.div<{ canDrop?: boolean; isOver?: boolean; + isDragging?: boolean; }>` + position: relative; padding: ${({ theme }) => theme.gridUnit}px; - border: ${({ canDrop, isOver, theme }) => { - if (canDrop) { - return `dashed 1px ${theme.colors.info.dark1}`; - } - if (isOver && !canDrop) { - return `dashed 1px ${theme.colors.error.dark1}`; + border: ${({ canDrop, isDragging, theme }) => { + if (isDragging) { + return `dashed 1px ${ + canDrop ? theme.colors.info.dark1 : theme.colors.error.dark1 + }`; } return `solid 1px ${theme.colors.grayscale.light2}`; }}; border-radius: ${({ theme }) => theme.gridUnit}px; + &:before, + &:after { + content: ' '; + position: absolute; + border-radius: ${({ theme }) => theme.gridUnit}px; + } + &:before { + display: ${({ isDragging }) => (isDragging ? 'block' : 'none')}; + background-color: ${({ theme, canDrop }) => + canDrop ? theme.colors.primary.base : theme.colors.error.light1}; + z-index: 10; + opacity: 0.2; Review Comment: If it makes sense for these, the Superset theme has some built-in opacity stops (which we can expand on if needed) <img width="198" alt="image" src="https://github.com/apache/superset/assets/812905/2b8da076-6afe-46f2-a0bb-48e53a5b32b4"> -- 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: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org