Skip to content

Commit 924a236

Browse files
authored
Merge pull request #5 from JelteMX/fix/ie11
Update to new timeline component
2 parents ff9e7e7 + 6d22249 commit 924a236

9 files changed

Lines changed: 1862 additions & 690 deletions

widgets/container/package-lock.json

Lines changed: 924 additions & 120 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

widgets/container/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,11 @@
2929
"@types/jest": "^24.0.0",
3030
"@types/react": "^16.8.17",
3131
"@types/react-dom": "^16.8.4",
32-
"@types/react-test-renderer": "^16.8.1",
33-
"@types/react-vertical-timeline-component": "^2.5.0"
32+
"@types/react-test-renderer": "^16.8.1"
3433
},
3534
"dependencies": {
3635
"big.js": "^5.2.2",
3736
"classnames": "^2.2.6",
38-
"react-vertical-timeline-component": "^2.5.0"
37+
"rc-vertical-timeline": "^1.0.0"
3938
}
4039
}

widgets/container/src/TimelineContainer.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
import { Component, ReactNode, createElement } from "react";
2-
import { VerticalTimeline } from "react-vertical-timeline-component";
2+
import { VerticalTimeline } from "rc-vertical-timeline";
33
import { hot } from "react-hot-loader/root";
44
import { TimelineContainerContainerProps } from "../typings/TimelineContainerProps";
55

66
import "./ui/TimelineContainer.scss";
7+
// import "rc-vertical-timeline/build/index.css";
78

89
class TimelineContainer extends Component<TimelineContainerContainerProps> {
910
render(): ReactNode {
1011
const { animate, dataSource, elements, layout } = this.props;
1112

12-
if (dataSource.status !== "available") {
13+
if (dataSource.status === "unavailable") {
1314
return null;
1415
}
1516

1617
return (
1718
<VerticalTimeline
1819
className={this.props.class}
20+
loading={dataSource.status === "loading"}
1921
animate={animate}
2022
layout={layout === "twoColumn" ? "2-columns" : "1-column"}
2123
>

widgets/container/src/TimelineContainer.webmodeler.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component, ReactNode, createElement } from "react";
2-
import { VerticalTimeline } from "react-vertical-timeline-component";
2+
import { VerticalTimeline } from "rc-vertical-timeline";
33
import { TimelineContainerPreviewProps } from "../typings/TimelineContainerProps";
44

55
declare function require(name: string): string;

0 commit comments

Comments
 (0)