OvidijusParsiunas / deep-chat

Fully customizable AI chatbot component for your website
https://deepchat.dev
MIT License
1.26k stars 170 forks source link

Struggling to change the text of drop-down items #170

Open anup-singh opened 2 months ago

anup-singh commented 2 months ago

How to change the text of menu items "Photo" & "Image"

image

OvidijusParsiunas commented 2 months ago

Hi @anup-singh.

Deep Chat currently only holds an option to overwrite full menu items via the dropupStyles property. This means that you have to provide both - the svg and the text. If you use text by itself - the item will only contain text. The following is an example for images:

{
  button: {
    styles: {
      text: {
        content: 'Images',
      },
    },
  },
}

You would also need to use the other properties in dropupStyles to adjust the overall styling.

I will try to investigate if I can implement a better way to only overwrite text or only overwrite SVGs. The next couple of days will be quite busy for me but please bear with me and I will update you on the latest progress of my research.

Thankyou!

OvidijusParsiunas commented 1 month ago

Hi, apologies for the wait. You can now set the text of dropdown items without affecting the icons in deep-chat-dev and deep-chat-react-dev packages version 9.0.171.

The dev packages behave just like the main packages except their names are different. They also contain a few property name changes, such as the request property is changed to connect and stream is moved to the connect object. All of the current/old properties will still keep working as usual except you will see warnings in the console for their deprecation and get a few TypeScript warnings which you can ignore.

Let me know if this helps!