0.0.1 • Published 3 years ago

@phaier/react-bootstrap-helper v0.0.1

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

@phaier/react-bootstrap-helper

Helper Library for React-Bootstrap

Install

yarn add @phaier/react-bootstrap-helper --save

Usage

ContextMenu

import * as React from 'react';
import { ContextMenu } from '@phaier/react-bootstrap-helper';

export const App: React.FunctionComponent<{}> = () => {
  return (
    <div className="container">
      <div className="row">
        <div className="col-md-12">
          <ContextMenu
            menu={
              <div className="dropdown-menu">
                <a
                  className="dropdown-item"
                  href="#"
                  onClick={(e) => {
                    e.preventDefault();
                    window.alert('Action');
                  }}
                >
                  Action
                </a>
                <a className="dropdown-item" href="#">
                  Another action
                </a>
                <a className="dropdown-item" href="#">
                  Something else here
                </a>
              </div>
            }
          >
            components use context menu.
          </ContextMenu>
        </div>
      </div>
    </div>
  );
};