react-venn-selectable
TypeScript icon, indicating that this package has built-in type declarations

0.1.5 • Public • Published

react-venn-selectable

version

React venn.js wrapper

Installation

npm i react-venn-selectable

Usage

See example folder

import * as React from 'react';
 
import {Venn} from 'react-venn-selectable';
import 'react-venn-selectable/src/index.css'
 
const App = () => {
  const sets3 = [
    {"sets": ["A"], "size": 12, "label": "A"},
    {"sets": ["B"], "size": 12, "label": "B"},
    {"sets": ["C"], "size": 12, "label": "C"},
    {"sets": ["A", "B"], "size": 2},
    {"sets": ["A", "C"], "size": 2},
    {"sets": ["B", "C"], "size": 2},
    {"sets": ["A", "B", "C"], "size": 2}
  ];
 
  const sets2 = [
    {"sets": ["A"], "size": 12, "label": "A"},
    {"sets": ["B"], "size": 12, "label": "B"},
    {"sets": ['A', "B"], "size": 2},
  ];
 
  const selectors2: string[] = ['(A∩B)'];
  
  return (
    <div>
      <Venn sets={sets2} selectors={selectors2}/>
      <Venn sets={sets3}/>
    </div>
  );
};

Readme

Keywords

Package Sidebar

Install

npm i react-venn-selectable

Weekly Downloads

1

Version

0.1.5

License

MIT

Unpacked Size

83 kB

Total Files

14

Last publish

Collaborators

  • andriyorehov