react-freshdesk-widget
A component of React for use the Freshdesk Widget.
Installation
Basic Usage
With custom button
Props
url
- requiredtype
- one of ['pop-up', 'incorporated']formTitle
- default: Help and supportformHeight
- default: 500pxsubmitThanks
- default: Thank you, one of our representatives will respond to you soon! =)buttonType
- only if the type property are equal 'pop-up'buttonText
- only if the type property are equal 'pop-up'buttonColor
- only if the type property are equal 'pop-up'buttonOffset
- only if the type property are equal 'pop-up'buttonPosition
- only if the type property are equal 'pop-up'buttonBackgroundColor
- only if the type property are equal 'pop-up'buttonBackgroundImage
- only if the type property are equal 'pop-up'autofill
- allows autofilling fields
url
(required)
An URL of the service of your Freshdesk
For example:
type
- one of ['pop-up', 'incorporated']
The type of widget you want to insert the page.
Currently you can perform through two ways:
- Through a pop-up where the user must click to display the widget.
- Incorporating direct in your HTML.
default: incorporated
For example:
formTitle
(optional)
What will be the title of the form.
default: Help and support
For example:
formHeight
The height of the form.
default: 500px
For example:
submitThanks
The message that appears after the user send feedback.
default: Thank you, one of our representatives will respond to you soon! =)
For example:
buttonType
- one of ['text', 'image']
The type of button when use pop-up.
default: text
Note: When do you use an image type is necessary to pass buttonBackgroundImage
property.
For example:
buttonText
- (optional)
The text of button.
default: Support
For example:
buttonColor
- (optional)
The font color of button text.
default: white
For example:
buttonBackgroundColor
- (optional)
The background-color of button.
default: #015453
For example:
buttonPosition
- one of ['left', 'right', 'top', 'bottom']
The position of button in the window.
default: top
For example:
buttonOffset
- (optional)
The offset of button.
default: 235px
For example:
buttonBackgroundImage
- (optional)
When you use the buttonType
with image, need to specify the URL and this property is for this.
default: 235px
For example:
autofill
- (optional)
If you want to fill any of the fields in with data from your application you
can do that here. This doesn't work for custom fields.
For example:
Development
To start developing in the project run:
Then ready at http://localhost:9001
.
Tests
Just run: