2.2.47 • Published 11 months ago

bsr-context-menu v2.2.47

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

bsr-context-menu

React component context menu

NPM JavaScript Style Guide

Install

npm install --save bsr-context-menu

Usage

import React, {useRef} from 'react';
import {useContextMenu} from 'bsr-context-menu';
import 'bsr-context-menu/dist/index.css'


function Body(text:string){
    return(
        <div style={{width:200,cursor:'pointer'}}>
            <div>{text}:1</div>
            <div>{text}:2</div>
            <div>{text}:3</div>
            <div>{text}:4</div>
        </div>
    )
}

export function P10_1(){
    const mRefMenu=useRef(null);
    useContextMenu(mRefMenu,Body('Menu'))
    return <div ref={mRefMenu}  style={{width:100,height:100,background:'grey'}}/>
}

License

MIT © ionson100

Examples, Help pages.

2.2.47

11 months ago

2.2.46

11 months ago