react-venn-selectable
v0.1.5
Published
React venn.js wrapper
Downloads
6
Readme
react-venn-selectable
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>
);
};