Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(components): fix EmptySelectorButton style #16932

Merged
merged 3 commits into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions components/src/atoms/buttons/EmptySelectorButton.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
import styled from 'styled-components'
import { Flex } from '../../primitives'
import {
ALIGN_CENTER,
CURSOR_DEFAULT,
CURSOR_POINTER,
FLEX_MAX_CONTENT,
Icon,
SPACING,
StyledText,
JUSTIFY_CENTER,
JUSTIFY_START,
ALIGN_CENTER,
FLEX_MAX_CONTENT,
SPACING,
StyledText,
} from '../../index'
import {
black90,
blue30,
blue50,
grey30,
grey40,
white,
} from '../../helix-design-system/colors'
import { borderRadius8 } from '../../helix-design-system/borders'
import { BORDERS, COLORS } from '../../helix-design-system'
import type { IconName } from '../../index'

interface EmptySelectorButtonProps {
onClick: () => void
text: string
Expand All @@ -41,10 +32,9 @@ export function EmptySelectorButton(
<Flex
gridGap={SPACING.spacing4}
padding={SPACING.spacing12}
backgroundColor={disabled ? grey30 : blue30}
color={disabled ? grey40 : black90}
borderRadius={borderRadius8}
border={`2px dashed ${disabled ? grey40 : blue50}`}
color={disabled ? COLORS.grey40 : COLORS.black90}
border={`2px dashed ${disabled ? COLORS.grey40 : COLORS.blue50}`}
borderRadius={BORDERS.borderRadius8}
width="100%"
height="100%"
alignItems={ALIGN_CENTER}
Expand Down Expand Up @@ -74,10 +64,20 @@ const StyledButton = styled.button<ButtonProps>`
border: none;
width: ${FLEX_MAX_CONTENT};
height: ${FLEX_MAX_CONTENT};
cursor: ${({ disabled }) => (disabled ? CURSOR_DEFAULT : CURSOR_POINTER)};
cursor: ${CURSOR_POINTER};
background-color: ${COLORS.blue30};
border-radius: ${BORDERS.borderRadius8};

&:focus-visible {
outline: 2px solid ${white};
box-shadow: 0 0 0 4px ${blue50};
border-radius: ${borderRadius8};
outline: 2px solid ${COLORS.white};
box-shadow: 0 0 0 4px ${COLORS.blue50};
border-radius: ${BORDERS.borderRadius8};
}
&:hover {
background-color: ${COLORS.blue35};
}
&:disabled {
background-color: ${COLORS.grey20};
cursor: ${CURSOR_DEFAULT};
}
`
Loading