React wrapper for driver.js
npm install react-driver.jsreact-driver.js - A React wrapper around driver.js.

With yarn:
``shellsession`
yarn add react-driver.js
With npm:
`shellsession`
npm install --save-dev react-driver.js
`jsx
import React, { Component } from "react";
import ReactDOM from "react-dom";
import { Driver, withDriver } from "react-driver.js";
class Child extends Component {
render() {
return
const App = ({ driver }) => (
title: "Title on Popover",
description: "Body of the popover",
position: "bottom"
}}
driver={driver}
>
);
const driverOptions = {
//Put some options here to be passed to the driver.js constructor
};
export default withDriver(App, driverOptions);
`
Use the withDriver HOC wherever you need a reference to the driver.
Then, wrap the component you wish to highlight as . API is the same as driver.js. Only highlight is supported atm.
Driver options follow:
`jsscrollIntoView()
{
animate: true, // Whether to animate or not
opacity: 0.75, // Background opacity (0 means only popovers and without overlay)
padding: 10, // Distance of element from around the edges
allowClose: true, // Whether the click on overlay should close or not
doneBtnText: 'Done', // Text on the final button
closeBtnText: 'Close', // Text on the close button for this step
stageBackground: '#ffffff', // Background color for the staged behind highlighted element
nextBtnText: 'Next', // Next button text for this step
prevBtnText: 'Previous', // Previous button text for this step
showButtons: false, // Do not show control buttons in footer
scrollIntoViewOptions: {}, // We use when possible, pass here the options for it if you want any`
onHighlightStarted: (Element) {}, // Called when element is about to be highlighted
onHighlighted: (Element) {}, // Called when element is fully highlighted
onDeselected: (Element) {}, // Called when element has been deselected
}
Popover options follow:
`jstop
{
title: 'Title for the Popover',
description: 'Description for it',
position: 'left', // can be , left, right, bottom``
}