HSLdevcom / digitransit-ui

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

Styling of DTAutosuggest input icons? #5023

Open hbruch opened 5 months ago

hbruch commented 5 months 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 5 months 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.