react-rectangle-popup-menu

0.0.1 • Public • Published

react-rectangle-popup-menu

React rectangle popup menu library. Demo

<PopupMenu />

class Popup {
  render() {
    <PopupMenu>
     // Content
    </PopupMenu>
  }
}

Parameters for <PopupMenu />

{
    width: ?number = 200,
    height: ?(number | 'auto') = 'auto', // If auto it's minimized to rows size
    direction: ?('top' | 'bottom' | 'left' | 'right') = 'top'
}

<PopupTable />

import FontAwesome from 'react-fontawesome';
 
const button = (<FontAwesome name="rocket" size="2x" />);
 
class Popup {
  render() {
    <PopupMenu width={190} direction="bottom" button={button}>
      <PopupTable rowItems={4}>
        <FontAwesome name="google-plus-square" size="2x" />
        <FontAwesome name="twitter-square" size="2x" />
        <FontAwesome name="google" size="2x" />
        <FontAwesome name="google" size="2x" />
 
        <FontAwesome name="facebook-official" size="2x" />
        <FontAwesome name="twitter-square" size="2x" />
        <FontAwesome name="spotify" size="2x" />
        <FontAwesome name="twitter-square" size="2x" />
 
        <FontAwesome name="google-plus-square" size="2x" />
        <FontAwesome name="google" size="2x" />
        <FontAwesome name="twitter-square" size="2x" />
      </PopupTable>
    </PopupMenu>
  }
}

Parameters for <PopupTable />

{
    // Items per row (used to generate normal width of placeholder)
    rowItems: ?number = 1
}

<PopupText />

class Popup {
  render() {
    <PopupMenu width={190} direction="bottom" button={button}>
      <PopupText>Some text</PopupText>
    </PopupMenu>
  }
}

Dependencies (5)

Dev Dependencies (24)

Package Sidebar

Install

npm i react-rectangle-popup-menu

Weekly Downloads

4

Version

0.0.1

License

MIT

Unpacked Size

36.9 MB

Total Files

8676

Last publish

Collaborators

  • alex2401