react-rule-group

1.0.2 • Public • Published

react-rule-group

Made with create-react-library

NPM JavaScript Style Guide

Install

npm install --save react-rule-group

Usage

import React, { Component } from 'react'

import { ReactRuleGroup } from 'react-rule-group'
import 'react-rule-group/dist/index.css'
const inputJson = [
  {
    "id": "g1",
    "type": "group",
    "rules": [
      {
        "type": "rule",
        "condition": {
          "condition_type":"last_name",
          "condition_operator":"=",
          "condition_value":"Praveen",
        }
      },
      {
        "id": "g1_g2",
        "type": "group",
        "rules": [
          {
            "type": "rule",
            "condition": {
              "condition_type":"",
              "condition_operator":"",
              "condition_value":"",
            }
          },
          ],
            "operator": "AND"
          }
        ],
        "operator": "OR"
      }
    ],
    "operator": "AND"
  }
]
class Example extends Component {
  render() {
    return <ReactRuleGroup rules={inputJson} />
  }
}

License

MIT © praveenax

/react-rule-group/

    Package Sidebar

    Install

    npm i react-rule-group

    Weekly Downloads

    0

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    31.3 kB

    Total Files

    7

    Last publish

    Collaborators

    • praveenax