@clickability/react-clickability-widget
v3.1.3
Published
A react component to access Clickability Service Requests
Downloads
233
Readme
react-clickability-widget
@clickability/react-clickability-widget
How to use the package
Install
npm install --save @clickability/react-clickability-widget
Usage
import React from 'react';
import { ClickabilityWidget } from '@clickability/react-clickability-widget';
// Contact Clickability at [email protected] to get your access token
const ACCESS_TOKEN = 'EXAMPLEKEY';
const DemoComponent = () => {
return (
<div>
<ClickabilityWidget
accessToken={ACCESS_TOKEN}
modalities={modalities}
postcodes={postcodes}
billerID={billerID}
schemes={schemes}
/>
</div>
);
};
Expected Type For Props
accessToken: String
modalities: Array[String]
postcodes: Array[Integer]
billerID: String
schemes: Array[String]
noBorder: Bool [Optional],
className: String [Optional],
style: Object [Optional],
Style
// You can pass `noBorder` into the props to have a plain component without any border and shadow.
<ClickabilityWidget
{...props}
noBorder
/>
// You can pass a css class via 'className' to style the component (You don't have access on everything).
<ClickabilityWidget
{...props}
className="styled-widget"
/>
// You can also pass a styled dict via 'style' to style the component.
<ClickabilityWidget
{...props}
style={{background: 'red'}}
/>
Example modified CSS class
.styled-widget {
background: red;
border: 2px solid yellow;
}