Open ninopenttinen opened 9 months ago
For more context: https://github.com/fintraffic-design/fds-coreui-css/pull/6
As a workaround you can already do:
import * as Fds from '@fintraffic/fds-coreui-css'
But I guess a benefit from having a wildcard export from the package would be so that your IDE can auto-import it. We would need to carefully consider the naming of the namespace export though to not conflict with what we might want to export from the components package for example.
But also if used from namespace like Fds, the usage would get a bit repetitive being Fds.Fds<Something>
unless the constants within the namespace would be with shorter names without the extra prefix but that change would probably not be so trivial anymore (at least if we want to keep supporting the current import style without namespace also).
Thanks for the workaround, didn't event consider we could do that too. But yeah, would of course be nice to just get it directly from FDS with an auto-complete, auto-import and all that.
Regards to the naming, moving from the direct imports into namespace import would be ideal imo. Then we would not need the extra prefix e.g. Fds.ColorInteractive200
, and would also be enforcing a certain style for usage (which would be good).
Of course hard to say how much of a "breaking change" this would be for other projects using this library.
We had this ticketed in our project, so I thought I might as well raise an issue about it here, since FDS is no longer "under our jurisdiction".
Original ticket description (in finnish):