Skip to content

Commit

Permalink
fix(Select): fixed spacing between prefix and customValueText
Browse files Browse the repository at this point in the history
  • Loading branch information
DSil committed May 31, 2023
1 parent 4df4e2c commit 143abec
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/orbit-components/src/Select/index.tsx
Expand Up @@ -244,10 +244,8 @@ SelectSuffix.defaultProps = {
theme: defaultTheme,
};

const StyledCustomValue = styled(({ _prefix, theme, _filled, _disabled, ...props }) => (
<div {...props} />
))`
${({ theme, _filled, disabled, prefix }) => css`
const StyledCustomValue = styled(({ _theme, _filled, _disabled, ...props }) => <div {...props} />)`
${({ theme, _filled, disabled }) => css`
color: ${(disabled && theme.orbit.paletteInkLight) ||
(_filled ? theme.orbit.colorTextInput : theme.orbit.colorPlaceholderInput)};
Expand All @@ -257,7 +255,7 @@ const StyledCustomValue = styled(({ _prefix, theme, _filled, _disabled, ...props
position: absolute;
height: 100%;
top: 0;
${left}: ${prefix ? "48px" : theme.orbit.spaceSmall};
${left}: ${theme.orbit.spaceSmall};
bottom: 0;
pointer-events: none;
`}
Expand Down Expand Up @@ -370,7 +368,7 @@ const Select = React.forwardRef<HTMLSelectElement, Props>((props, ref) => {
)}
<StyledSelectWrapper>
{customValueText && (
<StyledCustomValue disabled={disabled} _filled={filled} prefix={prefix}>
<StyledCustomValue disabled={disabled} _filled={filled}>
{customValueText}
</StyledCustomValue>
)}
Expand Down

0 comments on commit 143abec

Please sign in to comment.