Add an option for a footer and a custom header in the ChatPopUp#41
Open
Add an option for a footer and a custom header in the ChatPopUp#41
Conversation
|
What do you think about making the |
|
Or actually sorry, I didn't realize the footer accepted markdown. Might still be nice to accept a React Node though. Curious what others think. |
yen-tt
reviewed
Sep 21, 2023
yen-tt
reviewed
Sep 21, 2023
yen-tt
reviewed
Sep 25, 2023
| onClose: customOnClose, | ||
| title, | ||
| footer, | ||
| header, |
Collaborator
There was a problem hiding this comment.
thinking about it more, this wouldn't work because the header component needs to take in the onClose function below in order to control the display behavior of the chat popup/panel. We would need to take in a header component type and construct it inside.
Contributor
|
I have added support for the footer in this PR and added an item in the backlog for custom header support |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We wanted to add a footer to the
ChatPopUp, but we noticed that the component is not very flexible. There was no way to add the footer outside the component and style it in the correct position as the pop up chat hasposition: fixedstyling.So, I wanted to propose a small feature - adding an option for a footer text. This would be helpful for displaying a link to the Privacy Policy for example.
I added the footer inside the
ChatPanelcomponent, so it can be displayed in theChatPopUpcomponent as well and be in the correct position.This PR is just a quick example, the footer can be converted into a separate component of course, for now, I just added it as a div inside the
ChatPanelcomponent.The only thing I couldn't add is the styling for links inside the footer. In the example below I'm using
react-markdownto render rich text and display a link. Ideally, the link should be styled in a different color.