vrk-kpa / suomifi-ui-components

Suomi.fi-styleguide in React components
Other
30 stars 15 forks source link

[Feature] datePickerProps #844

Closed LJKaski closed 7 months ago

LJKaski commented 7 months ago

Description

This PR adds the possibility to add a collection of props in DateInput props that get passed to the datepicker element. This allows, for exampke, giving the picker a custom className and targeting the picker in certain situation where it wouldn't otherwise be possible due to the use of portal in the implementation.

Motivation and Context

This was reported by a developer and the solution should make it easier for them to use the component in certain situations, like inside modals.

How Has This Been Tested?

Tested in a Vite + React project with Suomi.fi modal and some modified styles. Also tested in a CRA project

Release notes

DateInput