mirror of
https://github.com/apache/superset.git
synced 2026-04-14 13:44:46 +00:00
fix: Button resizing in horizontal filter bar (#22365)
This commit is contained in:
committed by
GitHub
parent
de4f50909e
commit
3a442e09bf
@@ -28,8 +28,8 @@ export interface BadgeProps extends AntdBadgeProps {
|
||||
const Badge = styled(
|
||||
(
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
{ textColor, ...props }: BadgeProps,
|
||||
) => <AntdBadge {...props} />,
|
||||
{ textColor, color, text, ...props }: BadgeProps,
|
||||
) => <AntdBadge text={text} color={text ? color : undefined} {...props} />,
|
||||
)`
|
||||
& > sup {
|
||||
padding: 0 ${({ theme }) => theme.gridUnit * 2}px;
|
||||
|
||||
@@ -376,10 +376,14 @@ const DropdownContainer = forwardRef(
|
||||
{dropdownTriggerText}
|
||||
<Badge
|
||||
count={dropdownTriggerCount ?? overflowingCount}
|
||||
color={
|
||||
(dropdownTriggerCount ?? overflowingCount) > 0
|
||||
? theme.colors.primary.base
|
||||
: theme.colors.grayscale.light1
|
||||
}
|
||||
showZero
|
||||
css={css`
|
||||
margin-left: ${dropdownTriggerCount ?? overflowingCount
|
||||
? `${theme.gridUnit * 2}px`
|
||||
: '0'};
|
||||
margin-left: ${theme.gridUnit * 2}px;
|
||||
`}
|
||||
/>
|
||||
<Icons.DownOutlined
|
||||
|
||||
Reference in New Issue
Block a user