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

Cannot override styles of DatePicker with styled(DatePicker) #3490

Closed
magnh opened this issue Jun 5, 2024 · 1 comment · Fixed by #3509
Closed

Cannot override styles of DatePicker with styled(DatePicker) #3490

magnh opened this issue Jun 5, 2024 · 1 comment · Fixed by #3509
Assignees
Labels
🐛 bug Something isn't working

Comments

@magnh
Copy link
Contributor

magnh commented Jun 5, 2024

Describe the bug

I cannot override styles of DatePicker using styled(DatePicker).

Steps to reproduce the bug

https://codesandbox.io/p/live/a0f3cab7-46ad-4c23-ba83-f14e79bd83c8

Expected behavior

Would expect styled(DatePicker) to work, as for other EDS components.

Specifications

  • Version: 0.39.0
  • Browser: N/A
  • OS: N/A

Suggested solution

Did a quick test by modifying the component in node_modules.

Following this pattern on the DatePicker element worked: https://styled-components.com/docs/advanced#styling-normal-react-components

@magnh magnh added the 🐛 bug Something isn't working label Jun 5, 2024
@oddvernes
Copy link
Collaborator

Good point, we just need to append & HTMLAttributes<HTMLDivElement> to the DatePickerProps type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants