README
React Timelines
Modified version of jsainsburyplc/react-timelines version 2.7.2 with features for portal-web.
Publish to NPM repo:
git commit -am "blah" npm version patch # to increment patch number, or minor/major to increment minor/major number. npm publish
For local debugging:
cd path_to_timeline_proj npm link # create a link to the global repo dir.
cd path_to_proj rm -rf ./node_modules/react-timelines-vimod npm link react-timelines-vimod # symlink to global repo dir.
Check link
dir ./node_modules
should show
...
05/13/2021 02:07 PM
==== Original READMe.md ====
Install
# with npm
npm install react-timelines
# or with Yarn
yarn add react-timelines
Use
import Timeline from 'react-timelines'
const MyWidget = () => <Timeline {...props} />
export default MyWidget
Styling
Using Webpack
Using Webpack with CSS loader, add the following:
import 'react-timelines/lib/css/style.css'
Using Sass (SCSS)
Using Sass you can configure the timeline with variables:
$react-timelines-font-family: MaryAnn;
$react-timelines-sidebar-width: 320px;
@import '~/react-timelines/src/scss/style';
Without build tools
Create a CSS file with the contents of react-timelines/lib/css/style.css
and include it in <head>
Development
npm install
npm run watch
This library is developed using VSCode - opening it in VSCode will recommend extensions, and enable linting and auto-formatting of code.