0.0.1 • Published 4 years ago

react-sangal v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

npm.io

react-sangal

React ui components based on bootstrap 4

NPM JavaScript Style Guide Actions Status

Install

npm install --save bootstrap
npm install --save react-sangal

# or with yarn

yarn add bootstrap
yarn add react-sangal

Usage

Example usages under example folder

import * as React from "react";

import SangalTa from "react-sangal";

import "bootstrap/dist/css/bootstrap.min.css";

class Example extends React.Component {
  render() {
    const pager = {
      currentPage: this.state.currentPage,
      lastPage: this.state.lastPage,
      onPageChangeEvent: this.onPageChange
    };
    const header = {
      clmnSelection: { text: "Selection", type: "checkbox", editable: true },
      clmnName: { text: "Name", type: "text", editable: false },
      clmnSurname: { text: "Surname", type: "text", editable: true }
    };
    const rows = [
      { clmnSelection: "1", clmnName: "John", clmnSurname: "Doe" },
      { clmnSelection: "0", clmnName: "Adam", clmnSurname: "Jackson" },
      { clmnSelection: "0", clmnName: "Garry", clmnSurname: "Smith" }
    ];
    return <SangalTable pager={pager} header={header} rows={rows} />;
  }
}

License

MIT © emrecankoc

PS: Project template based on create-react-library

0.0.1

4 years ago