Created
May 24, 2017 13:24
-
-
Save rrharvey/cc62037df56e635cba6a62bea48d7500 to your computer and use it in GitHub Desktop.
Revisions
-
rrharvey created this gist
May 24, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ import * as React from 'react'; import * as classNames from 'classnames'; interface DropdownProps { text: string; rightAlign?: boolean; } class Dropdown extends React.Component<DropdownProps, null> { constructor() { super(); } render() { const { text, rightAlign } = this.props; return ( <div className="dropdown"> <button type="button" className="btn btn-default dropdown-toggle" > {text} <span className="caret" /> </button> <ul className={classNames('dropdown-menu', { 'dropdown-menu-right': rightAlign })}> <li><a href="#">Action</a></li> <li><a href="#">Another action</a></li> <li><a href="#">Something else here</a></li> <li role="separator" className="divider" /> <li><a href="#">Separated link</a></li> </ul> </div> ); } } export default Dropdown;