onfido-sdk-ui icon indicating copy to clipboard operation
onfido-sdk-ui copied to clipboard

Customize the icons via customUI

Open psenechal-ws opened this issue 4 years ago • 10 comments

What was the expected behaviour?

It would be interesting to have the option to customize the color of the icons via customUI.

What happened instead?

No property in customUI seems to allow such customization. The colors are hardcoded as a fill attribute in the SVGs (instances of #353FF4 and #3640F5 can be found in various places)

There might be other ways of achieving this. The only workaround I'm aware of for styling SVGs as background-image uses the filter CSS property. It potentially interferes with other styling options.

Version info:

  • Onfido SDK: 6.9.0
  • OS: all
  • Browser: all
  • Device: all
  • Node: N/A
  • Framework or relevant dependencies (if applicable): N/A

Integration configuration:

N/A

Steps to reproduce:

N/A

Demo:

Not available.

psenechal-ws avatar Sep 28 '21 15:09 psenechal-ws

Hello @psenechal-ws You should be able to customize the colour of icons backgrounds via "colorBackgroundIcon" Here is one example: https://github.com/onfido/onfido-sdk-ui/blob/16b248a08877ab144218a82cd073cf598df77240/UI_CUSTOMIZATION.md and here is another example, https://github.com/onfido/onfido-sdk-ui/search?q=colorBackgroundIcon.

The colors can be customized as "colorBackgroundIcon": "#FFD2D2" where the value after the hash is hexodecimal number.

andra-radu avatar Sep 29 '21 11:09 andra-radu

HI @andra-radu , could u please add a param for customizing the color of the focus state of the button?

cebandionis avatar Mar 31 '22 12:03 cebandionis

Hello @psenechal-ws - Could you please rephrase "the color of the focus state of the button"? or maybe you can share a screenshot of the button you are referring to.

andra-radu avatar Apr 01 '22 12:04 andra-radu

@andra-radu Screenshot 2022-04-04 091011

i've changed button color according to documentation, but on focus color is still blue.

cebandionis avatar Apr 04 '22 06:04 cebandionis

@andra-radu I have raised this with our SDK team for further investigation and I will get back to you as soon as they will make progress on this.

andra-radu avatar Apr 08 '22 05:04 andra-radu

Hello @cebandionis - I have checked with our SDK team and they've mentioned that there is no customisation for the focus state. We have active and hover but not focus. I apologise for the inconvenience caused. If you have any further questions or concerns please do not hesitate to contact us. I would be more than glad to assist you.

andra-radu avatar Apr 24 '22 19:04 andra-radu

@andra-radu I got it, so maybe you can set an extra param for focus? because it looks ugly when I want to change the button color? That blue border on focus remains

cebandionis avatar Apr 26 '22 06:04 cebandionis

@cebandionis - I'm currently checking with our SDK team on this to see if they can set an extra param for focus and I will let you know as soon as I will receive an update from them.

andra-radu avatar Apr 26 '22 12:04 andra-radu

Meanwhile, you could go always go for overwriting our style, e.g.

:focus {
    box-shadow: inset 0 0 0 2px yellow,inset 0 0 0 3px yellow !important
}

it-ony avatar Apr 27 '22 12:04 it-ony

@cebandionis We're working on adding support for this (see PR) and expect this to release in the next version 8.2.0 (no ETA yet)

DannyvanderJagt avatar Jun 13 '22 16:06 DannyvanderJagt