npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@personare/react-freshdesk-widget

v0.3.0

Published

A component of React for use the Freshdesk Widget

Downloads

835

Readme

react-freshdesk-widget Build Status

A component of React for use the Freshdesk Widget

Demo

Check it live :)

Installation

yarn add @personare/react-freshdesk-widget

Basic Usage

import FreshdeskWidget from '@personare/react-freshdesk-widget';

...
render() {
    return (
        <FreshdeskWidget url="https://support.freshdesk.com" />
    );
}
...

With custom button

import FreshdeskWidget from '@personare/react-freshdesk-widget';

...
render() {
    return (
        <FreshdeskWidget url="https://support.freshdesk.com" type="pop-up">
            <button>Send Feedback</button>
        </FreshdeskWidget>
    );
}
...

Props

url (required)

An URL of the service of your Freshdesk

For example:

...
render() {
    return (
        <FreshdeskWidget url="https://support.freshdesk.com" />
    );
}
...

type - one of ['pop-up', 'incorporated']

The type of widget you want to insert the page.

Currently you can perform through two ways:

  1. Through a pop-up where the user must click to display the widget.
  2. Incorporating direct in your HTML.

default: incorporated

For example:

...
render() {
    return (
        <FreshdeskWidget 
            url="https://support.freshdesk.com"
            type="pop-up"
        />
    );
}
...

formTitle (optional)

What will be the title of the form.

default: Help and support

For example:

...
render() {
    return (
        <FreshdeskWidget 
            url="https://support.freshdesk.com"
            formTitle="This is a custom title"
        />
    );
}
...

formHeight

The height of the form.

default: 500px

For example:

...
render() {
    return (
        <FreshdeskWidget 
            url="https://support.freshdesk.com"
            formHeight="700px"
        />
    );
}
...

submitThanks

The message that appears after the user send feedback.

default: Thank you, one of our representatives will respond to you soon! =)

For example:

...
render() {
    return (
        <FreshdeskWidget 
            url="https://support.freshdesk.com"
            submitThanks="Thank you!!!"
        />
    );
}
...

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:

...
render() {
    return (
        <FreshdeskWidget 
            url="https://support.freshdesk.com"
            type="pop-up"
            buttonType="image"
            buttonBackgroundImage="my-custom-button.png"
        />
    );
}
...

buttonText - (optional)

The text of button.

default: Support

For example:

...
render() {
    return (
        <FreshdeskWidget 
            url="https://support.freshdesk.com"
            type="pop-up"
            buttonType="text"
            buttonText="Send feedback!"
        />
    );
}
...

buttonColor - (optional)

The font color of button text.

default: white

For example:

...
render() {
    return (
        <FreshdeskWidget 
            url="https://support.freshdesk.com"
            type="pop-up"
            buttonType="text"
            buttonText="Send feedback!"
            buttonColor="yellow"
        />
    );
}
...

buttonBackgroundColor - (optional)

The background-color of button.

default: #015453

For example:

...
render() {
    return (
        <FreshdeskWidget 
            url="https://support.freshdesk.com"
            type="pop-up"
            buttonType="text"
            buttonText="Send feedback!"
            buttonColor="yellow"
            buttonBackgroundColor="#012471"
        />
    );
}
...

buttonPosition - one of ['left', 'right', 'top', 'bottom']

The position of button in the window.

default: top

For example:

...
render() {
    return (
        <FreshdeskWidget 
            url="https://support.freshdesk.com"
            type="pop-up"
            buttonType="text"
            buttonText="Send feedback!"
            buttonColor="yellow"
            buttonBackgroundColor="#012471"
            buttonPosition="bottom"
        />
    );
}
...

buttonOffset - (optional)

The offset of button.

default: 235px

For example:

...
render() {
    return (
        <FreshdeskWidget 
            url="https://support.freshdesk.com"
            type="pop-up"
            buttonType="text"
            buttonText="Send feedback!"
            buttonColor="yellow"
            buttonBackgroundColor="#012471"
            buttonPosition="bottom"
            buttonOffset="150px"
        />
    );
}
...

buttonBackgroundImage - (optional)

When you use the buttonType with image, need to specify the URL and this property is for this.

default: 235px

For example:

...
render() {
    return (
        <FreshdeskWidget 
            url="https://support.freshdesk.com"
            type="pop-up"
            buttonType="image"
            buttonBackgroundImage="http://localhost/my-custom-image.png"
            buttonPosition="bottom"
            buttonOffset="150px"
        />
    );
}
...

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:

...
render() {
    return (
        <FreshdeskWidget 
            url="https://support.freshdesk.com"
            type="pop-up"
            autofill={{ requester: user.email }}
        />
    );
}
...

Development

To start developing in the project run:

yarn serve

Then ready at http://localhost:9001.

Tests

Just run:

yarn test

This scaffolding will be generated by @Personare/react-component-generator