chatscope / chat-ui-kit-react

Build your own chat UI with React components in few minutes. Chat UI Kit from chatscope is an open source UI toolkit for developing web chat applications.
https://chatscope.io
MIT License
1.25k stars 104 forks source link

Custom sendButton icon #122

Open WillSmithTE opened 1 year ago

WillSmithTE commented 1 year ago

Great library, thanks for maintaining it.

Would you consider allowing for a custom SendButton icon passed as a prop?

andreisocaciu commented 6 months ago

Any news on this feature? 😀

supersnager commented 6 months ago

@WillSmithTE Please explain what exactly you want to achieve? Do you want to add an "icon" property to the <SendButton /> component, or pass custom send icon to the <MessageInput /> component?

WillSmithTE commented 6 months ago

I believe it would have to be on the MessageInput, because that uses the SendButton directly. Unless you wanted to open up a sendButtonProps on the MessageInput, and then add the icon property to the SendButton.

I don't mind how the implementation is, but the idea is to change the icon from <FontAwesomeIcon icon={faPaperPlane} /> to whatever we want.

Probably a more flexible approach is to add a prop for a totally custom SendButton, which is then given the disabled and onClick props by MessageInput.

supersnager commented 6 months ago

@WillSmithTE Thank you for the clarification. At a glance the last option (custom SendButton) is the best, but but I will take a fresh look at it tomorrow.