Skip to content

fix(input-date-picker): update the focus and hover chevron icon color #9146

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

Merged
merged 8 commits into from
Apr 23, 2024
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@
padding-inline: var(--calcite-toggle-spacing);
}

.chevron-icon-down {
color: var(--calcite-color-text-3);

&:hover {
color: var(--calcite-color-text-1);
}
}

.chevron-icon-up {
color: var(--calcite-color-text-1);
}

:host([range]) {
.input-container {
@apply flex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,7 @@ export class InputDatePicker
// we set tab index to -1 to prevent delegatesFocus from stealing focus before we can set it
<span class={CSS.toggleIcon} tabIndex={-1}>
<calcite-icon
class={open ? "chevron-icon-up" : "chevron-icon-down"}
Copy link
Member

@benelan benelan Apr 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add these classes to the CSS object in resources.ts. See two lines above for a usage example.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I consolidated this css into a single class and added it to resources.ts.

icon={open ? "chevron-up" : "chevron-down"}
scale={getIconScale(this.scale)}
/>
Expand Down