Skip to content

Commit a11eb06

Browse files
committed
feat(new-hope): fix cursor of arrow in Combobox
1 parent a7fe387 commit a11eb06

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

packages/plasma-new-hope/src/components/Combobox/ComboboxNew/Combobox.styles.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,19 @@ export const Ul = styled.ul<{
3939
}
4040
`;
4141

42-
export const IconArrowWrapper = styled.div<{ disabled: boolean }>`
42+
export const IconArrowWrapper = styled.div<{ disabled: boolean; readOnly: boolean }>`
4343
line-height: 0;
4444
color: var(${tokens.disclosureIconColor});
45-
cursor: ${({ disabled }) => (disabled ? 'inherit' : 'pointer')};
45+
cursor: ${({ disabled, readOnly }) => (disabled || readOnly ? 'inherit' : 'pointer')};
4646
4747
.${classes.arrowInverse} {
4848
transform: rotate(-180deg);
4949
}
5050
5151
&:hover,
5252
&:active {
53-
color: ${({ disabled }) =>
54-
disabled ? `var(${tokens.disclosureIconColor})` : `var(${tokens.disclosureIconColorHover})`};
53+
color: ${({ disabled, readOnly }) =>
54+
disabled || readOnly ? `var(${tokens.disclosureIconColor})` : `var(${tokens.disclosureIconColorHover})`};
5555
}
5656
`;
5757

packages/plasma-new-hope/src/components/Combobox/ComboboxNew/Combobox.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,7 @@ export const comboboxRoot = (Root: RootProps<HTMLInputElement, Omit<ComboboxProp
555555
contentRight={
556556
<IconArrowWrapper
557557
disabled={disabled}
558+
readOnly={readOnly}
558559
onClick={handleClickArrow}
559560
className={classes.comboboxTargetArrow}
560561
>

0 commit comments

Comments
 (0)