HSLdevcom / digitransit-ui

Digitransit UI ("Reittiopas.fi")
https://www.reittiopas.fi/
Other
236 stars 130 forks source link

Styling of DTAutosuggest input icons? #5023

Open hbruch opened 1 week ago

hbruch commented 1 week ago

For one of our instances, I'd like to use different from/to marker icons/colors.

Currently, the mapMarker icon is hardcoded in digitransit-component-autosuggest-panel (e.g. here).

The colors are coded in digitransit-component-autosuggest's scss:

image

What would be the best way to allow customizing from/to marker icons/colors for single instances?

vesameskanen commented 6 days ago

Good question. Some colors come from style files, some can be defined using props. There should be a consistent solution because adding a new color prop for each icon is probably bad idea (too many icons). Maybe some kind of single 'styles' prop might work; it could contain optional styles for any icon and maybe other stuff as well.