HSLdevcom/digitransit-ui

Styling of DTAutosuggest input icons?

Opened this issue · 1 comments

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?

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.