react-planning
A react component that provide a planning Component with some cool features.
Getting Started
The planning component is based on a HTML grid system. To add items to the planning you just have to drag and drop the desired item inside the timeline component. The drag and drop action is handled by react-DnD.
You can pass a customItemType to the ElementWrapper component and a customInnerElementType to the timeline component to customized your planning with your own react component.
No JQuery.
Installing
A step by step series of examples that tell you how to get a development env running
Say what the step will be
npm install --save react-planning
Usage
import { Planner } from 'react-planning';
Example
https://vince0382.github.io/react-horizontal-timeline
See the full repository here : https://github.com/Vince0382/react-horizontal-timeline for the full working example
;; ; ; //import logo;;;;;;; const App = { const scrollEnabled setScrollEnabled = ; const groupedEnabled setGroupedEnabled = ; const showOccurences setShowOccurences = ; const items = itemId: 1 logo: logo1 description: 'Caro Confort' elementType: 'range' itemId: 2 logo: logo2 description: 'AB Menuiserie' elementType: 'range' itemId: 3 logo: logo3 description: 'Fournier' elementType: 'range' itemId: 4 logo: logo4 description: 'Krëfel' elementType: 'range' itemId: 5 logo: logo5 description: 'MG Terrassements' elementType: 'range' itemId: 6 logo: logo6 description: 'Roosens Bétons' elementType: 'range' itemId: 7 logo: logo7 description: 'Sopi Façades' elementType: 'range' ; const fixedItems setFixedItems = ; const occurences setOccurences = ; ; const startDate = '2019-10-01'; const endDate = '2019-12-31'; const addHandler = { console; } const removeHandler = { console; } const updateHandler = { console; } const options = callBacks : onAdd : addHandler onRemove: removeHandler onUpdate: updateHandler startDate : startDate endDate: endDate return <DndProvider backend=MouseBackEnd> <> <div> items </div> <div> <Planner items=fixedItems options=options scroll=scrollEnabled grouped=groupedEnabled/> </div> </> </DndProvider>
License
This project is licensed under the MIT License - see the LICENSE.md file for details
Acknowledgments
- Hat tip to anyone whose code was used
- Inspiration
- etc