Socket
Socket
Sign inDemoInstall

materialui-pagination

Package Overview
Dependencies
47
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.5 to 0.0.6

es/index.js

102

package.json
{
"name": "materialui-pagination",
"version": "0.0.5",
"description": "",
"main": "./dist/bundle.js",
"keywords": [
"react",
"react-component",
"material design",
"material-ui",
"materialui-pagination",
"material-ui-pagination",
"materialui-paginate",
"materialui-pagination"
"version": "0.0.6",
"description": "A simple pagination component for Material UI.",
"main": "lib/index.js",
"module": "es/index.js",
"files": [
"css",
"es",
"lib",
"umd"
],
"scripts": {
"prestart": "babel-node tools/startMessage.js",
"start": "npm-run-all --parallel open:src lint:watch",
"open:src": "babel-node tools/srcServer.js",
"lint": "node_modules/.bin/esw webpack.config.* src tools",
"lint:watch": "npm run lint -- --watch",
"test": "mocha --reporter spec tools/testSetup.js \"src/**/*.test.js\"",
"test:watch": "npm run test -- --watch",
"clean-dist": "npm run remove-dist && mkdir dist",
"remove-dist": "node_modules/.bin/rimraf ./dist",
"build:html": "babel-node tools/buildHtml.js",
"prebuild": "npm-run-all clean-dist lint build:html",
"build": "babel-node tools/build.js",
"postbuild": "babel-node tools/distServer.js"
"build": "nwb build-react-component",
"clean": "nwb clean-module && nwb clean-demo",
"start": "nwb serve-react-demo",
"test": "nwb test-react",
"test:coverage": "nwb test-react --coverage",
"test:watch": "nwb test-react --server"
},

@@ -38,42 +28,13 @@ "dependencies": {

},
"peerDependencies": {
"react": "15.x"
},
"devDependencies": {
"babel-cli": "6.8.0",
"babel-core": "6.8.0",
"babel-loader": "6.2.4",
"babel-plugin-react-display-name": "2.0.0",
"babel-polyfill": "6.8.0",
"babel-preset-es2015": "6.6.0",
"babel-preset-react": "6.5.0",
"babel-preset-react-hmre": "1.1.1",
"babel-register": "6.8.0",
"cheerio": "^0.22.0",
"colors": "1.1.2",
"compression": "1.6.1",
"cross-env": "1.0.7",
"css-loader": "0.23.1",
"enzyme": "2.2.0",
"eslint": "2.9.0",
"eslint-plugin-import": "1.6.1",
"eslint-plugin-react": "5.0.1",
"eslint-watch": "2.1.11",
"eventsource-polyfill": "0.9.6",
"expect": "1.19.0",
"express": "4.13.4",
"extract-text-webpack-plugin": "1.0.1",
"file-loader": "0.8.5",
"jsdom": "8.5.0",
"mocha": "2.4.5",
"nock": "8.0.0",
"npm-run-all": "1.8.0",
"open": "0.0.5",
"react-addons-test-utils": "15.0.2",
"redux-immutable-state-invariant": "1.2.3",
"redux-mock-store": "1.0.2",
"rimraf": "2.5.2",
"style-loader": "0.13.1",
"url-loader": "0.5.7",
"webpack": "1.13.0",
"webpack-dev-middleware": "1.6.1",
"webpack-hot-middleware": "2.10.0"
"nwb": "0.15.x",
"react": "^15.5.4",
"react-dom": "^15.5.4"
},
"author": "",
"homepage": "https://github.com/franciskim722/materialui-pagination#readme",
"license": "MIT",
"repository": {

@@ -83,8 +44,15 @@ "type": "git",

},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/franciskim722/materialui-pagination/issues"
"url": "https://github.com/franciskim722/materialui-pagination/issues"
},
"homepage": "https://github.com/franciskim722/materialui-pagination#readme"
"keywords": [
"react",
"react-component",
"material design",
"material-ui",
"materialui-pagination",
"material-ui-pagination",
"materialui-paginate",
"materialui-pagination"
]
}

@@ -14,4 +14,92 @@ # materialui-pagination

## Example
```js
//React
import React from 'react';
import PropTypes from 'prop-types';
import {render} from 'react-dom';
//Material UI Dependency for touch / tap / click events
import injectTapEventPlugin from 'react-tap-event-plugin';
injectTapEventPlugin();
//Material UI Components
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import {Card} from 'material-ui/Card';
import Divider from 'material-ui/Divider';
import {Table, TableBody, TableHeader, TableHeaderColumn, TableRow, TableRowColumn} from 'material-ui/Table';
//Import the pagination component
import Pagination from 'materialui-pagination';
//Demo API to simulate async actions
import RowApi from './api/rows';
class ExampleTable extends React.Component {
constructor(props, context) {
super(props, context);
this.state = {
rowsPerPage: [5,10,15],
rows: [],
numberOfRows: 5,
page: 1,
total: undefined
};
this.updateRows = this.updateRows.bind(this);
}
componentWillMount() {
RowApi.getRows(this.state)
.then((updatedState) => {
this.setState(updatedState);
});
}
updateRows(state){
RowApi.getRows(state)
.then((updatedState) => {
this.setState(updatedState);
});
}
render(){
return (
<MuiThemeProvider>
<Card>
<Table>
<TableHeader>
<TableRow>
<TableHeaderColumn>Row Number</TableHeaderColumn>
</TableRow>
</TableHeader>
<TableBody>
{this.state.rows.map((row, index) => {
return (
<TableRow key={index}>
<TableRowColumn>{row}</TableRowColumn>
</TableRow>
);
})}
</TableBody>
</Table>
<Divider />
<Pagination
total={this.state.total}
rowsPerPage={this.state.rowsPerPage}
page={this.state.page}
numberOfRows={this.state.numberOfRows}
updateRows={this.updateRows}
/>
</Card>
</MuiThemeProvider>
);
}
}
render(<ExampleTable />, document.querySelector('#app'))
```

@@ -18,0 +106,0 @@

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