Skip to content

Commit c6a6980

Browse files
committed
Add hovertext in case of danger variant
1 parent 5ddf81f commit c6a6980

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ActionList/Item.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ const getItemVariant = (variant = 'default', disabled?: boolean) => {
138138
annotationColor: get('colors.fg.muted'),
139139
hoverCursor: 'pointer',
140140
hoverBg: get('colors.actionListItem.danger.hoverBg'),
141-
focusBg: get('colors.actionListItem.danger.activeBg')
141+
focusBg: get('colors.actionListItem.danger.activeBg'),
142+
hoverText: get('colors.actionListItem.danger.hoverText')
142143
}
143144
default:
144145
return {
@@ -196,6 +197,7 @@ const StyledItem = styled.div<
196197
--item-hover-bg-override,
197198
${({variant, item}) => getItemVariant(variant, item?.disabled).hoverBg}
198199
);
200+
color: ${({variant, item}) => getItemVariant(variant, item?.disabled).hoverText};
199201
cursor: ${({variant, item}) => getItemVariant(variant, item?.disabled).hoverCursor};
200202
}
201203
}

0 commit comments

Comments
 (0)