Socket
Socket
Sign inDemoInstall

react-image-timeline

Package Overview
Dependencies
6
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.4 to 1.0.0

build/asset-manifest.json

2

index.js

@@ -1,1 +0,1 @@

module.exports = require('./dist/timeline');
module.exports = require('./src/lib/timeline');
{
"name": "react-image-timeline",
"version": "0.2.4",
"description": "react-image-timeline",
"version": "1.0.0",
"main": "index.js",
"homepage": "http://aaron9000.github.io/react-image-timeline",
"dependencies": {},
"devDependencies": {
"@babel/cli": "^7.2.3",
"@babel/core": "^7.2.2",
"@babel/preset-env": "^7.3.1",
"@babel/preset-react": "^7.0.0",
"chai": "^4.2.0",
"enzyme": "^3.8.0",
"enzyme-adapter-react-16": "^1.8.0",
"gh-pages": "^2.0.1",
"node-sass": "^4.11.0",
"prop-types": "^15.6.2",
"ramda": "^0.26.1",
"react": "^16.7.0",
"react-dom": "^16.7.0",
"react-scripts": "2.1.3",
"sinon": "^7.2.3",
"svg-inline-loader": "^0.8.0",
"webpack-cli": "^3.2.1"
},
"peerDependencies": {
"react": "^16.0.0"
},
"scripts": {
"example": "node example",
"build-example": "webpack --config webpack.config.build.example && cp example/index.html dist-example/index.html",
"build": "./node_modules/.bin/babel lib --presets es2015,react,stage-0 --out-dir dist && cp lib/timeline.css dist/timeline.css && cp lib/timeline.scss dist/timeline.scss",
"prepublish": "npm run build",
"test": "mocha test/.setup.js test/**/*_test.js --compilers js:babel-register --require ignore-styles"
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"build-module": "node-sass src/lib/timeline.scss dist/timeline.css && webpack",
"predeploy": "yarn build",
"deploy": "gh-pages -d build"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"repository": {

@@ -24,3 +58,2 @@ "type": "git",

"image",
"ramda",
"time",

@@ -33,40 +66,3 @@ "line"

"url": "https://github.com/aaron9000/react-image-timeline/issues"
},
"homepage": "https://github.com/aaron9000/react-image-timeline/",
"dependencies": {},
"peerDependencies": {
"moment": ">= 2.0.0",
"react": ">= 0.14.0",
"ramda": ">= 0.20.0"
},
"devDependencies": {
"autoprefixer-loader": "^3.1.0",
"babel-cli": "^6.0.0",
"babel-core": "^6.7.7",
"babel-loader": "^6.2.4",
"babel-preset-airbnb": "^1.0.1",
"babel-preset-es2015": "^6.6.0",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-0": "^6.5.0",
"babel-register": "^6.4.3",
"chai": "^3.5.0",
"css-loader": "^0.19.0",
"enzyme": "^2.0.0",
"file-loader": "^0.8.4",
"ignore-styles": "^1.2.0",
"jsdom": "^8.0.1",
"mocha": "^5.2.0",
"moment": "2.22.1",
"ramda": "^0.20.1",
"raw-loader": "^0.5.1",
"react": "^0.14.7",
"react-addons-test-utils": "^0.14.7",
"react-dom": "^0.14.7",
"react-hot-loader": "^1.2.7",
"sinon": "^1.17.3",
"style-loader": "^0.12.3",
"url-loader": "^0.5.6",
"webpack": "^1.9.11",
"webpack-dev-server": "^1.9.0"
}
}
# React Image Timeline
An image-centric timeline component for React.js. View chronological events in a pleasant way.
An image-centric timeline component for React.js. View chronological events in a pleasant way.
***Updated for React 16***
#### Features
### Features
- Responsive & mobile-friendly
- Easily customized
- Gracefully handles overflow and non-uniform content
- Lightweight (only CSS and SVG)
- Only 20kb
- ***Zero*** extra dependencies
![screenshot](https://github.com/aaron9000/react-image-timeline/blob/master/src/assets/screenshot.png)
#### View Example
### View Live Example
http://aaron9000.github.io/react-image-timeline/
#### Screenshot
![screenshot](https://github.com/aaron9000/react-image-timeline/blob/master/assets/screenshot.png)
#### Add to Existing Project
- `npm install moment --save` if needed
- `npm install ramda --save` if needed
### Add to Existing Project
- `npm install react-image-timeline --save`
#### Usage
### Usage
```js

@@ -36,10 +31,7 @@ import ReactDOM from 'react-dom';

#### Sample Data
[View Sample Data](https://gist.github.com/aaron9000/ca9600c9fc2e8c4b9a503b5789413852)
#### Props
| Key | Type | Required
|--------------------------|--------------------------|--------------------------|
| events | array<Event> | required |
| events | array of "Event" | required |
| reverseOrder | boolean | |

@@ -53,3 +45,2 @@ | customStartLabel | component | |

#### Event

@@ -66,7 +57,21 @@ | Key | Type | Required|

#### Custom Event Data
or
```js
{
date: Date.parse("2013-09-27"),
text: "Sed leo elit, pellentesque sit amet congue quis, ornare nec lorem.",
title: "Cairo, Egypt",
imageUrl: "http://github.com/aaron9000/react-image-timeline/src/assets/egypt.jpg"
}
```
### Customization
#### Event Metadata
To pass extra data into custom components, use the `extras` field on the `event` model.
#### Custom Styles
To customize the timeline styles, add CSS to override [timeline.css](https://github.com/aaron9000/react-image-timeline/blob/master/lib/timeline.css).
To customize the timeline styles, add CSS to override [timeline.css](https://github.com/aaron9000/react-image-timeline/blob/master/lib/timeline.css).

@@ -99,8 +104,10 @@ #### Custom Dot Pattern

### Scripts
#### Run Example Project
```
*clone repository*
npm install
npm run example
npm run start
```
Then, visit [localhost:3000/example](http://localhost:3000/example) in your browser.

@@ -111,2 +118,1 @@ #### Run Tests

```

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc