deep-chat icon indicating copy to clipboard operation
deep-chat copied to clipboard

Can we use a custom React component for setting SVG within submitButtonStyles?

Open avibathula opened this issue 11 months ago • 0 comments

Hi - I have multiple places where I am having to use a custom styled SVG submit button and I currently have duplicated code.

DeepChat's submitButtonStyles is taking the SVG content as string and my other places are being defined as in-lined JSX.

To avoid code duplication, I can either use a common string defining the SVG and then use the following in JSX code

<span dangerouslySetInnerHTML={{ __html: submitButtonSVG }} />

OR

implement a custom component and use that in DeepChat's submitButtonStyles - is this second option even possible?

What would the best approach here?

avibathula avatar Dec 28 '24 04:12 avibathula