1.0.2 • Published 2 years ago

react-rule-group v1.0.2

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

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

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago