@lemonadejs/timeline
Version:
LemonadeJS timeline component
30 lines (23 loc) • 697 B
JavaScript
// @ts-nocheck
import React, { useRef, useEffect } from "react";
import Component from './index';
import "./style.css";
// @ts-ignore
const Timeline = React.forwardRef((props, mainReference) => {
// Dom element
const Ref = useRef(null);
// Get the properties for the spreadsheet
let options = { ...props };
useEffect(() => {
// @ts-ignore
if (! Ref.current.innerHTML) {
mainReference.current = Component(Ref.current, options);
}
}, []);
let prop = {
ref: Ref,
style: { height: '100%', width: '100%' }
};
return React.createElement("div", prop);
})
export default Timeline;