-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Doc Site - moved dropdown menu to its own page
- Loading branch information
Hai Nguyen
committed
Nov 8, 2014
1 parent
715b7e8
commit 540bafe
Showing
3 changed files
with
51 additions
and
33 deletions.
There are no files selected for viewing
This file contains 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 characters
48 changes: 48 additions & 0 deletions
48
docs/src/app/components/pages/components/drop-down-menu.jsx
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** | ||
* @jsx React.DOM | ||
*/ | ||
|
||
var React = require('react'), | ||
mui = require('mui'), | ||
CodeExample = require('../../code-example/code-example.jsx'), | ||
|
||
menuItems = [ | ||
{ payload: '1', text: 'Never' }, | ||
{ payload: '2', text: 'Every Night' }, | ||
{ payload: '3', text: 'Weeknights' }, | ||
{ payload: '4', text: 'Weekends' }, | ||
{ payload: '5', text: 'Weekly' }, | ||
]; | ||
|
||
var MenusPage = React.createClass({ | ||
|
||
render: function() { | ||
return ( | ||
<div> | ||
<h2 className="mui-font-style-headline">Drop Down Menu</h2> | ||
{this._getDropDownMenuExample()} | ||
</div> | ||
); | ||
}, | ||
|
||
_getDropDownMenuExample: function() { | ||
var code = | ||
"var menuItems = [\n" + | ||
" { payload: '1', text: 'Never' },\n" + | ||
" { payload: '2', text: 'Every Night' },\n" + | ||
" { payload: '3', text: 'Weeknights' },\n" + | ||
" { payload: '4', text: 'Weekends' },\n" + | ||
" { payload: '5', text: 'Weekly' },\n" + | ||
"];\n\n" + | ||
"<DropDownMenu menuItems={menuItems} />"; | ||
|
||
return ( | ||
<CodeExample code={code}> | ||
<mui.DropDownMenu menuItems={menuItems} onChange={this._onDropDownMenuChange} /> | ||
</CodeExample> | ||
); | ||
} | ||
|
||
}); | ||
|
||
module.exports = MenusPage; |
This file contains 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 characters