0.3.8 • Published 8 years ago

react-vui-dropdown v0.3.8

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
8 years ago

react-vui-dropdown

NPM version Build status Coverage Status Dependency Status

A react component to display a dropdown menu.

Installation

Install from NPM:

npm install react-vui-dropdown

Install from Bower:

bower install react-vui-dropdown

Usage

Import the style:

@import "bower_components/react-vui-dropdown/dropdown.scss"; // or...

@import "node_modules/react-vui-dropdown/dropdown.scss";

The dropdown takes the following properties:

  • text: required, the text to be displayed in the dropdown button
  • isPrimary: optional flag indicating whether opener is primary button
  • isTextVisible: optional flag for whether the text is visible
  • disabled: optional flag for whether the dropdown button is enabled
  • items: optional array of items for the menu
var dropdown = require('react-vui-dropdown'),
	ButtonMenu = dropdown.ButtonMenu,
	ContextMenu = dropdown.ContextMenu;

var items = [
	{ "text": "Action Item 1", "action": someFunction},
	{ "text": "Action Item 2", "action": someFunction, "isEnabled": false}
];

<ButtonMenu text="Stuff" items={items} />

<ButtonMenu text="Stuff" items={items} disabled />

<ContextMenu text="Stuff" items={items} />

Contributing

Code Style

This repository is configured with EditorConfig rules and contributions should make use of them. See the VUI Best Practices & Style Guide for more information.

0.3.8

8 years ago

0.3.7

8 years ago

0.3.6

8 years ago

0.3.5

8 years ago

0.3.4

8 years ago

0.3.3

8 years ago

0.3.2

8 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.1

8 years ago