upgrade joyride

pull/1081/head
gabrielburnworth 2019-01-07 16:08:48 -08:00
parent 0e19100d74
commit 87323e56f9
3 changed files with 6 additions and 7 deletions

View File

@ -44,7 +44,6 @@
"@types/react": "16.7.18",
"@types/react-color": "2.13.6",
"@types/react-dom": "16.0.11",
"@types/react-joyride": "2.0.1",
"@types/react-redux": "6.0.11",
"axios": "0.18.0",
"boxed_value": "1.0.0",
@ -75,7 +74,7 @@
"react-addons-test-utils": "15.6.2",
"react-color": "2.14.1",
"react-dom": "16.7.0",
"react-joyride": "2.0.0-15",
"react-joyride": "2.0.2",
"react-redux": "5.1.1",
"react-test-renderer": "16.7.0",
"react-transition-group": "2.5.0",

View File

@ -5,7 +5,7 @@ import { tourNames, TOUR_STEPS } from "../tours";
import { mount, shallow } from "enzyme";
import { RunTour, Tour } from "../tour";
import { history } from "../../history";
import { State } from "react-joyride";
import { CallBackProps } from "react-joyride";
describe("<RunTour />", () => {
const EMPTY_DIV = "<div></div>";
@ -22,7 +22,7 @@ describe("<RunTour />", () => {
});
describe("<Tour />", () => {
const fakeCallbackData = (data: Partial<State>): State => ({
const fakeCallbackData = (data: Partial<CallBackProps>): CallBackProps => ({
action: data.action || "start",
index: data.index || 0,
controlled: false,

View File

@ -1,6 +1,6 @@
import * as React from "react";
import { t } from "i18next";
import Joyride, { Step as TourStep, State as CBData, StepStyles } from "react-joyride";
import Joyride, { Step as TourStep, CallBackProps } from "react-joyride";
import { Color } from "../ui";
import { history } from "../history";
import { TOUR_STEPS, tourPageNavigation } from "./tours";
@ -16,7 +16,7 @@ const strings = () => ({
const STYLES = {
buttonNext: { backgroundColor: Color.green },
buttonBack: { color: Color.darkGray }
} as StepStyles;
};
interface TourProps {
steps: TourStep[];
@ -30,7 +30,7 @@ interface TourState {
export class Tour extends React.Component<TourProps, TourState> {
state: TourState = { run: false, index: 0, };
callback = ({ action, index, step, type }: CBData) => {
callback = ({ action, index, step, type }: CallBackProps) => {
console.log("Tour debug:", step.target, type, action);
tourPageNavigation(step.target);
if (type === "step:after") {