How to use menu method in argos

Best JavaScript code snippet using argos

Dropdowns.js

Source:Dropdowns.js Github

copy

Full Screen

1import React from 'react';2import {3 Row,4 Col,5 Grid,6 Panel,7 Button,8 MenuItem,9 PanelBody,10 PanelHeader,11 ButtonGroup,12 SplitButton,13 ButtonToolbar,14 PanelContainer,15 DropdownButton,16 SplitHoverButton,17 DropdownHoverButton,18} from '@sketchpixy/rubix';19class DropdownsAndDropups extends React.Component {20 render() {21 return (22 <PanelContainer noOverflow>23 <Panel>24 <PanelHeader className='bg-darkgreen45 fg-white'>25 <Grid>26 <Row>27 <Col xs={12}>28 <h4>Dropdowns and Dropups</h4>29 </Col>30 </Row>31 </Grid>32 </PanelHeader>33 <PanelBody>34 <Grid>35 <Row>36 <Col xs={6}>37 <div>38 <DropdownButton bsStyle='darkgreen45' title='Basic' id='dropdown-basic'>39 <MenuItem eventKey="1">Action</MenuItem>40 <MenuItem eventKey="2">Another action</MenuItem>41 <MenuItem eventKey="3" active>Active Item</MenuItem>42 <MenuItem divider />43 <MenuItem disabled eventKey="4">Disabled link</MenuItem>44 <MenuItem eventKey="5">Separated link</MenuItem>45 </DropdownButton>46 </div>47 <br />48 <div>49 <DropdownButton bsStyle='lightblue' title='With headers' id='dropdown-headers'>50 <MenuItem header>Dropdown Header</MenuItem>51 <MenuItem eventKey="1">Action</MenuItem>52 <MenuItem eventKey="2">Another action</MenuItem>53 <MenuItem eventKey="3" active>Active Item</MenuItem>54 <MenuItem divider />55 <MenuItem header>Dropdown Header</MenuItem>56 <MenuItem disabled eventKey="4">Disabled link</MenuItem>57 <MenuItem eventKey="5">Separated link</MenuItem>58 </DropdownButton>59 </div>60 </Col>61 <Col xs={6} className='text-right'>62 <div>63 <DropdownButton outlined bsStyle='darkgreen45' title='Outlined' id='dropdown-outlined' pullRight>64 <MenuItem eventKey="1">Action</MenuItem>65 <MenuItem eventKey="2">Another action</MenuItem>66 <MenuItem eventKey="3" active>Active Item</MenuItem>67 <MenuItem divider />68 <MenuItem disabled eventKey="4">Disabled link</MenuItem>69 <MenuItem eventKey="5">Separated link</MenuItem>70 </DropdownButton>71 </div>72 <br />73 <div>74 <DropdownButton bsStyle='orange' title='Disabled' id='dropdown-disabled' disabled outlined>75 <MenuItem header>Dropdown Header</MenuItem>76 <MenuItem eventKey="1">Action</MenuItem>77 <MenuItem eventKey="2">Another action</MenuItem>78 <MenuItem eventKey="3" active>Active Item</MenuItem>79 <MenuItem divider />80 <MenuItem header>Dropdown Header</MenuItem>81 <MenuItem disabled eventKey="4">Disabled link</MenuItem>82 <MenuItem eventKey="5">Separated link</MenuItem>83 </DropdownButton>84 </div>85 </Col>86 </Row>87 <hr />88 <Row>89 <Col xs={6}>90 <div>91 <DropdownButton bsStyle='darkgreen45' title='Basic' id='dropdown-basic-dropup' dropup>92 <MenuItem eventKey="1">Action</MenuItem>93 <MenuItem eventKey="2">Another action</MenuItem>94 <MenuItem eventKey="3" active>Active Item</MenuItem>95 <MenuItem divider />96 <MenuItem disabled eventKey="4">Disabled link</MenuItem>97 <MenuItem eventKey="5">Separated link</MenuItem>98 </DropdownButton>99 </div>100 <br />101 <div>102 <DropdownButton bsStyle='lightblue' title='With headers' id='dropdown-headers-dropup' dropup>103 <MenuItem header>Dropdown Header</MenuItem>104 <MenuItem eventKey="1">Action</MenuItem>105 <MenuItem eventKey="2">Another action</MenuItem>106 <MenuItem eventKey="3" active>Active Item</MenuItem>107 <MenuItem divider />108 <MenuItem header>Dropdown Header</MenuItem>109 <MenuItem disabled eventKey="4">Disabled link</MenuItem>110 <MenuItem eventKey="5">Separated link</MenuItem>111 </DropdownButton>112 </div>113 </Col>114 <Col xs={6} className='text-right'>115 <div>116 <DropdownButton outlined bsStyle='darkgreen45' title='Outlined' id='dropdown-outlined-dropup' pullRight dropup>117 <MenuItem eventKey="1">Action</MenuItem>118 <MenuItem eventKey="2">Another action</MenuItem>119 <MenuItem eventKey="3" active>Active Item</MenuItem>120 <MenuItem divider />121 <MenuItem disabled eventKey="4">Disabled link</MenuItem>122 <MenuItem eventKey="5">Separated link</MenuItem>123 </DropdownButton>124 </div>125 <br />126 <div>127 <DropdownButton bsStyle='orange' title='Disabled' id='dropdown-disabled-dropup' disabled dropup outlined>128 <MenuItem header>Dropdown Header</MenuItem>129 <MenuItem eventKey="1">Action</MenuItem>130 <MenuItem eventKey="2">Another action</MenuItem>131 <MenuItem eventKey="3" active>Active Item</MenuItem>132 <MenuItem divider />133 <MenuItem header>Dropdown Header</MenuItem>134 <MenuItem disabled eventKey="4">Disabled link</MenuItem>135 <MenuItem eventKey="5">Separated link</MenuItem>136 </DropdownButton>137 </div>138 </Col>139 </Row>140 <br />141 </Grid>142 </PanelBody>143 </Panel>144 </PanelContainer>145 );146 }147}148class DropdownsAndDropupsHover extends React.Component {149 render() {150 return (151 <PanelContainer noOverflow>152 <Panel>153 <PanelHeader className='bg-brown fg-white'>154 <Grid>155 <Row>156 <Col xs={12}>157 <h4>Dropdowns and Dropups (Hover buttons)</h4>158 </Col>159 </Row>160 </Grid>161 </PanelHeader>162 <PanelBody>163 <Grid>164 <Row>165 <Col xs={6}>166 <div>167 <DropdownHoverButton bsStyle='brown' title='Basic' id='dropdown-hover-basic'>168 <MenuItem eventKey="1">Action</MenuItem>169 <MenuItem eventKey="2">Another action</MenuItem>170 <MenuItem eventKey="3" active>Active Item</MenuItem>171 <MenuItem divider />172 <MenuItem disabled eventKey="4">Disabled link</MenuItem>173 <MenuItem eventKey="5">Separated link</MenuItem>174 </DropdownHoverButton>175 </div>176 <br />177 <div>178 <DropdownHoverButton bsStyle='lightblue' title='With headers' id='dropdown-hover-headers'>179 <MenuItem header>Dropdown Header</MenuItem>180 <MenuItem eventKey="1">Action</MenuItem>181 <MenuItem eventKey="2">Another action</MenuItem>182 <MenuItem eventKey="3" active>Active Item</MenuItem>183 <MenuItem divider />184 <MenuItem header>Dropdown Header</MenuItem>185 <MenuItem disabled eventKey="4">Disabled link</MenuItem>186 <MenuItem eventKey="5">Separated link</MenuItem>187 </DropdownHoverButton>188 </div>189 </Col>190 <Col xs={6} className='text-right'>191 <div>192 <DropdownHoverButton outlined bsStyle='darkgreen45' title='Outlined' id='dropdown-hover-outlined' pullRight>193 <MenuItem eventKey="1">Action</MenuItem>194 <MenuItem eventKey="2">Another action</MenuItem>195 <MenuItem eventKey="3" active>Active Item</MenuItem>196 <MenuItem divider />197 <MenuItem disabled eventKey="4">Disabled link</MenuItem>198 <MenuItem eventKey="5">Separated link</MenuItem>199 </DropdownHoverButton>200 </div>201 <br />202 <div>203 <DropdownHoverButton bsStyle='orange' title='Disabled' id='dropdown-hover-disabled' disabled outlined>204 <MenuItem header>Dropdown Header</MenuItem>205 <MenuItem eventKey="1">Action</MenuItem>206 <MenuItem eventKey="2">Another action</MenuItem>207 <MenuItem eventKey="3" active>Active Item</MenuItem>208 <MenuItem divider />209 <MenuItem header>Dropdown Header</MenuItem>210 <MenuItem disabled eventKey="4">Disabled link</MenuItem>211 <MenuItem eventKey="5">Separated link</MenuItem>212 </DropdownHoverButton>213 </div>214 </Col>215 </Row>216 <hr />217 <Row>218 <Col xs={6}>219 <div>220 <DropdownHoverButton bsStyle='brown' title='Basic' id='dropdown-hover-basic-dropup' dropup>221 <MenuItem eventKey="1">Action</MenuItem>222 <MenuItem eventKey="2">Another action</MenuItem>223 <MenuItem eventKey="3" active>Active Item</MenuItem>224 <MenuItem divider />225 <MenuItem disabled eventKey="4">Disabled link</MenuItem>226 <MenuItem eventKey="5">Separated link</MenuItem>227 </DropdownHoverButton>228 </div>229 <br />230 <div>231 <DropdownHoverButton bsStyle='lightblue' title='With headers' id='dropdown-hover-headers-dropup' dropup>232 <MenuItem header>Dropdown Header</MenuItem>233 <MenuItem eventKey="1">Action</MenuItem>234 <MenuItem eventKey="2">Another action</MenuItem>235 <MenuItem eventKey="3" active>Active Item</MenuItem>236 <MenuItem divider />237 <MenuItem header>Dropdown Header</MenuItem>238 <MenuItem disabled eventKey="4">Disabled link</MenuItem>239 <MenuItem eventKey="5">Separated link</MenuItem>240 </DropdownHoverButton>241 </div>242 </Col>243 <Col xs={6} className='text-right'>244 <div>245 <DropdownHoverButton outlined bsStyle='darkgreen45' title='Outlined' id='dropdown-hover-outlined-dropup' pullRight dropup>246 <MenuItem eventKey="1">Action</MenuItem>247 <MenuItem eventKey="2">Another action</MenuItem>248 <MenuItem eventKey="3" active>Active Item</MenuItem>249 <MenuItem divider />250 <MenuItem disabled eventKey="4">Disabled link</MenuItem>251 <MenuItem eventKey="5">Separated link</MenuItem>252 </DropdownHoverButton>253 </div>254 <br />255 <div>256 <DropdownHoverButton bsStyle='orange' title='Disabled' id='dropdown-hover-disabled-dropup' disabled dropup outlined>257 <MenuItem header>Dropdown Header</MenuItem>258 <MenuItem eventKey="1">Action</MenuItem>259 <MenuItem eventKey="2">Another action</MenuItem>260 <MenuItem eventKey="3" active>Active Item</MenuItem>261 <MenuItem divider />262 <MenuItem header>Dropdown Header</MenuItem>263 <MenuItem disabled eventKey="4">Disabled link</MenuItem>264 <MenuItem eventKey="5">Separated link</MenuItem>265 </DropdownHoverButton>266 </div>267 </Col>268 </Row>269 <br />270 </Grid>271 </PanelBody>272 </Panel>273 </PanelContainer>274 );275 }276}277class DropdownsAndDropupsInverse extends React.Component {278 render() {279 return (280 <PanelContainer noOverflow containerClasses='bg-darkgreen45 fg-white'>281 <Panel>282 <PanelHeader className='bg-darkgreen45 fg-white'>283 <Grid>284 <Row>285 <Col xs={12}>286 <h4>Dropdowns and Dropups (inverse)</h4>287 </Col>288 </Row>289 </Grid>290 </PanelHeader>291 <PanelBody>292 <Grid>293 <Row>294 <Col xs={6}>295 <div>296 <DropdownButton inverse bsStyle='darkgreen45' title='Basic' id='dropdown-basic-inverse'>297 <MenuItem eventKey="1">Action</MenuItem>298 <MenuItem eventKey="2">Another action</MenuItem>299 <MenuItem eventKey="3" active>Active Item</MenuItem>300 <MenuItem divider />301 <MenuItem disabled eventKey="4">Disabled link</MenuItem>302 <MenuItem eventKey="5">Separated link</MenuItem>303 </DropdownButton>304 </div>305 <br />306 <div>307 <DropdownButton inverse bsStyle='lightblue' title='With headers' id='dropdown-headers-inverse'>308 <MenuItem header>Dropdown Header</MenuItem>309 <MenuItem eventKey="1">Action</MenuItem>310 <MenuItem eventKey="2">Another action</MenuItem>311 <MenuItem eventKey="3" active>Active Item</MenuItem>312 <MenuItem divider />313 <MenuItem header>Dropdown Header</MenuItem>314 <MenuItem disabled eventKey="4">Disabled link</MenuItem>315 <MenuItem eventKey="5">Separated link</MenuItem>316 </DropdownButton>317 </div>318 </Col>319 <Col xs={6} className='text-right'>320 <div>321 <DropdownButton inverse bsStyle='darkgreen45' title='Outlined' id='dropdown-outlined-inverse' pullRight>322 <MenuItem eventKey="1">Action</MenuItem>323 <MenuItem eventKey="2">Another action</MenuItem>324 <MenuItem eventKey="3" active>Active Item</MenuItem>325 <MenuItem divider />326 <MenuItem disabled eventKey="4">Disabled link</MenuItem>327 <MenuItem eventKey="5">Separated link</MenuItem>328 </DropdownButton>329 </div>330 <br />331 <div>332 <DropdownButton inverse bsStyle='orange' title='Disabled' id='dropdown-disabled-inverse' disabled>333 <MenuItem header>Dropdown Header</MenuItem>334 <MenuItem eventKey="1">Action</MenuItem>335 <MenuItem eventKey="2">Another action</MenuItem>336 <MenuItem eventKey="3" active>Active Item</MenuItem>337 <MenuItem divider />338 <MenuItem header>Dropdown Header</MenuItem>339 <MenuItem disabled eventKey="4">Disabled link</MenuItem>340 <MenuItem eventKey="5">Separated link</MenuItem>341 </DropdownButton>342 </div>343 </Col>344 </Row>345 <hr className='border-lightgreen' />346 <Row>347 <Col xs={6}>348 <div>349 <DropdownButton inverse bsStyle='darkgreen45' title='Basic' id='dropdown-basic-dropup-inverse' dropup>350 <MenuItem eventKey="1">Action</MenuItem>351 <MenuItem eventKey="2">Another action</MenuItem>352 <MenuItem eventKey="3" active>Active Item</MenuItem>353 <MenuItem divider />354 <MenuItem disabled eventKey="4">Disabled link</MenuItem>355 <MenuItem eventKey="5">Separated link</MenuItem>356 </DropdownButton>357 </div>358 <br />359 <div>360 <DropdownButton inverse bsStyle='lightblue' title='With headers' id='dropdown-headers-dropup-inverse' dropup>361 <MenuItem header>Dropdown Header</MenuItem>362 <MenuItem eventKey="1">Action</MenuItem>363 <MenuItem eventKey="2">Another action</MenuItem>364 <MenuItem eventKey="3" active>Active Item</MenuItem>365 <MenuItem divider />366 <MenuItem header>Dropdown Header</MenuItem>367 <MenuItem disabled eventKey="4">Disabled link</MenuItem>368 <MenuItem eventKey="5">Separated link</MenuItem>369 </DropdownButton>370 </div>371 </Col>372 <Col xs={6} className='text-right'>373 <div>374 <DropdownButton inverse bsStyle='darkgreen45' title='Outlined' id='dropdown-outlined-dropup-inverse' pullRight dropup>375 <MenuItem eventKey="1">Action</MenuItem>376 <MenuItem eventKey="2">Another action</MenuItem>377 <MenuItem eventKey="3" active>Active Item</MenuItem>378 <MenuItem divider />379 <MenuItem disabled eventKey="4">Disabled link</MenuItem>380 <MenuItem eventKey="5">Separated link</MenuItem>381 </DropdownButton>382 </div>383 <br />384 <div>385 <DropdownButton inverse bsStyle='orange' title='Disabled' id='dropdown-disabled-dropup-inverse' disabled dropup>386 <MenuItem header>Dropdown Header</MenuItem>387 <MenuItem eventKey="1">Action</MenuItem>388 <MenuItem eventKey="2">Another action</MenuItem>389 <MenuItem eventKey="3" active>Active Item</MenuItem>390 <MenuItem divider />391 <MenuItem header>Dropdown Header</MenuItem>392 <MenuItem disabled eventKey="4">Disabled link</MenuItem>393 <MenuItem eventKey="5">Separated link</MenuItem>394 </DropdownButton>395 </div>396 </Col>397 </Row>398 <br />399 </Grid>400 </PanelBody>401 </Panel>402 </PanelContainer>403 );404 }405}406class SplitDropdownsAndDropups extends React.Component {407 render() {408 return (409 <PanelContainer noOverflow>410 <Panel>411 <PanelHeader className='bg-pinkishred fg-white'>412 <Grid>413 <Row>414 <Col xs={12}>415 <h4>Split Button Dropdowns and Dropups</h4>416 </Col>417 </Row>418 </Grid>419 </PanelHeader>420 <PanelBody>421 <Grid>422 <Row>423 <Col xs={6}>424 <div>425 <SplitButton bsStyle='pinkishred' title='Basic' id='split-dropdown-basic'>426 <MenuItem eventKey="1">Action</MenuItem>427 <MenuItem eventKey="2">Another action</MenuItem>428 <MenuItem eventKey="3" active>Active Item</MenuItem>429 <MenuItem divider />430 <MenuItem disabled eventKey="4">Disabled link</MenuItem>431 <MenuItem eventKey="5">Separated link</MenuItem>432 </SplitButton>433 </div>434 <br />435 <div>436 <SplitButton bsStyle='lightblue' title='With headers' id='split-dropdown-headers'>437 <MenuItem header>Dropdown Header</MenuItem>438 <MenuItem eventKey="1">Action</MenuItem>439 <MenuItem eventKey="2">Another action</MenuItem>440 <MenuItem eventKey="3" active>Active Item</MenuItem>441 <MenuItem divider />442 <MenuItem header>Dropdown Header</MenuItem>443 <MenuItem disabled eventKey="4">Disabled link</MenuItem>444 <MenuItem eventKey="5">Separated link</MenuItem>445 </SplitButton>446 </div>447 </Col>448 <Col xs={6} className='text-right'>449 <div>450 <SplitButton outlined bsStyle='darkgreen45' title='Outlined' id='split-dropdown-outlined' pullRight>451 <MenuItem eventKey="1">Action</MenuItem>452 <MenuItem eventKey="2">Another action</MenuItem>453 <MenuItem eventKey="3" active>Active Item</MenuItem>454 <MenuItem divider />455 <MenuItem disabled eventKey="4">Disabled link</MenuItem>456 <MenuItem eventKey="5">Separated link</MenuItem>457 </SplitButton>458 </div>459 <br />460 <div>461 <SplitButton bsStyle='orange' title='Disabled' id='split-dropdown-disabled' disabled outlined>462 <MenuItem header>Dropdown Header</MenuItem>463 <MenuItem eventKey="1">Action</MenuItem>464 <MenuItem eventKey="2">Another action</MenuItem>465 <MenuItem eventKey="3" active>Active Item</MenuItem>466 <MenuItem divider />467 <MenuItem header>Dropdown Header</MenuItem>468 <MenuItem disabled eventKey="4">Disabled link</MenuItem>469 <MenuItem eventKey="5">Separated link</MenuItem>470 </SplitButton>471 </div>472 </Col>473 </Row>474 <hr />475 <Row>476 <Col xs={6}>477 <div>478 <SplitButton bsStyle='pinkishred' title='Basic' id='split-dropdown-basic-dropup' dropup>479 <MenuItem eventKey="1">Action</MenuItem>480 <MenuItem eventKey="2">Another action</MenuItem>481 <MenuItem eventKey="3" active>Active Item</MenuItem>482 <MenuItem divider />483 <MenuItem disabled eventKey="4">Disabled link</MenuItem>484 <MenuItem eventKey="5">Separated link</MenuItem>485 </SplitButton>486 </div>487 <br />488 <div>489 <SplitButton bsStyle='lightblue' title='With headers' id='split-dropdown-headers-dropup' dropup>490 <MenuItem header>Dropdown Header</MenuItem>491 <MenuItem eventKey="1">Action</MenuItem>492 <MenuItem eventKey="2">Another action</MenuItem>493 <MenuItem eventKey="3" active>Active Item</MenuItem>494 <MenuItem divider />495 <MenuItem header>Dropdown Header</MenuItem>496 <MenuItem disabled eventKey="4">Disabled link</MenuItem>497 <MenuItem eventKey="5">Separated link</MenuItem>498 </SplitButton>499 </div>500 </Col>501 <Col xs={6} className='text-right'>502 <div>503 <SplitButton outlined bsStyle='darkgreen45' title='Outlined' id='split-dropdown-outlined-dropup' pullRight dropup>504 <MenuItem eventKey="1">Action</MenuItem>505 <MenuItem eventKey="2">Another action</MenuItem>506 <MenuItem eventKey="3" active>Active Item</MenuItem>507 <MenuItem divider />508 <MenuItem disabled eventKey="4">Disabled link</MenuItem>509 <MenuItem eventKey="5">Separated link</MenuItem>510 </SplitButton>511 </div>512 <br />513 <div>514 <SplitButton bsStyle='orange' title='Disabled' id='split-dropdown-disabled-dropup' disabled dropup outlined>515 <MenuItem header>Dropdown Header</MenuItem>516 <MenuItem eventKey="1">Action</MenuItem>517 <MenuItem eventKey="2">Another action</MenuItem>518 <MenuItem eventKey="3" active>Active Item</MenuItem>519 <MenuItem divider />520 <MenuItem header>Dropdown Header</MenuItem>521 <MenuItem disabled eventKey="4">Disabled link</MenuItem>522 <MenuItem eventKey="5">Separated link</MenuItem>523 </SplitButton>524 </div>525 </Col>526 </Row>527 <br />528 </Grid>529 </PanelBody>530 </Panel>531 </PanelContainer>532 );533 }534}535class SplitDropdownsAndDropupsHover extends React.Component {536 render() {537 return (538 <PanelContainer noOverflow>539 <Panel>540 <PanelHeader className='bg-blue fg-white'>541 <Grid>542 <Row>543 <Col xs={12}>544 <h4>Split Button Dropdowns and Dropups (Hover buttons)</h4>545 </Col>546 </Row>547 </Grid>548 </PanelHeader>549 <PanelBody>550 <Grid>551 <Row>552 <Col xs={6}>553 <div>554 <SplitHoverButton bsStyle='blue' title='Basic' id='split-hover-dropdown-basic'>555 <MenuItem eventKey="1">Action</MenuItem>556 <MenuItem eventKey="2">Another action</MenuItem>557 <MenuItem eventKey="3" active>Active Item</MenuItem>558 <MenuItem divider />559 <MenuItem disabled eventKey="4">Disabled link</MenuItem>560 <MenuItem eventKey="5">Separated link</MenuItem>561 </SplitHoverButton>562 </div>563 <br />564 <div>565 <SplitHoverButton bsStyle='lightblue' title='With headers' id='split-hover-dropdown-headers'>566 <MenuItem header>Dropdown Header</MenuItem>567 <MenuItem eventKey="1">Action</MenuItem>568 <MenuItem eventKey="2">Another action</MenuItem>569 <MenuItem eventKey="3" active>Active Item</MenuItem>570 <MenuItem divider />571 <MenuItem header>Dropdown Header</MenuItem>572 <MenuItem disabled eventKey="4">Disabled link</MenuItem>573 <MenuItem eventKey="5">Separated link</MenuItem>574 </SplitHoverButton>575 </div>576 </Col>577 <Col xs={6} className='text-right'>578 <div>579 <SplitHoverButton outlined bsStyle='darkgreen45' title='Outlined' id='split-hover-dropdown-outlined' pullRight>580 <MenuItem eventKey="1">Action</MenuItem>581 <MenuItem eventKey="2">Another action</MenuItem>582 <MenuItem eventKey="3" active>Active Item</MenuItem>583 <MenuItem divider />584 <MenuItem disabled eventKey="4">Disabled link</MenuItem>585 <MenuItem eventKey="5">Separated link</MenuItem>586 </SplitHoverButton>587 </div>588 <br />589 <div>590 <SplitHoverButton bsStyle='orange' title='Disabled' id='split-hover-dropdown-disabled' disabled outlined>591 <MenuItem header>Dropdown Header</MenuItem>592 <MenuItem eventKey="1">Action</MenuItem>593 <MenuItem eventKey="2">Another action</MenuItem>594 <MenuItem eventKey="3" active>Active Item</MenuItem>595 <MenuItem divider />596 <MenuItem header>Dropdown Header</MenuItem>597 <MenuItem disabled eventKey="4">Disabled link</MenuItem>598 <MenuItem eventKey="5">Separated link</MenuItem>599 </SplitHoverButton>600 </div>601 </Col>602 </Row>603 <hr />604 <Row>605 <Col xs={6}>606 <div>607 <SplitHoverButton bsStyle='blue' title='Basic' id='split-hover-dropdown-basic-dropup' dropup>608 <MenuItem eventKey="1">Action</MenuItem>609 <MenuItem eventKey="2">Another action</MenuItem>610 <MenuItem eventKey="3" active>Active Item</MenuItem>611 <MenuItem divider />612 <MenuItem disabled eventKey="4">Disabled link</MenuItem>613 <MenuItem eventKey="5">Separated link</MenuItem>614 </SplitHoverButton>615 </div>616 <br />617 <div>618 <SplitHoverButton bsStyle='lightblue' title='With headers' id='split-hover-dropdown-headers-dropup' dropup>619 <MenuItem header>Dropdown Header</MenuItem>620 <MenuItem eventKey="1">Action</MenuItem>621 <MenuItem eventKey="2">Another action</MenuItem>622 <MenuItem eventKey="3" active>Active Item</MenuItem>623 <MenuItem divider />624 <MenuItem header>Dropdown Header</MenuItem>625 <MenuItem disabled eventKey="4">Disabled link</MenuItem>626 <MenuItem eventKey="5">Separated link</MenuItem>627 </SplitHoverButton>628 </div>629 </Col>630 <Col xs={6} className='text-right'>631 <div>632 <SplitHoverButton outlined bsStyle='darkgreen45' title='Outlined' id='split-hover-dropdown-outlined-dropup' pullRight dropup>633 <MenuItem eventKey="1">Action</MenuItem>634 <MenuItem eventKey="2">Another action</MenuItem>635 <MenuItem eventKey="3" active>Active Item</MenuItem>636 <MenuItem divider />637 <MenuItem disabled eventKey="4">Disabled link</MenuItem>638 <MenuItem eventKey="5">Separated link</MenuItem>639 </SplitHoverButton>640 </div>641 <br />642 <div>643 <SplitHoverButton bsStyle='orange' title='Disabled' id='split-hover-dropdown-disabled-dropup' disabled dropup outlined>644 <MenuItem header>Dropdown Header</MenuItem>645 <MenuItem eventKey="1">Action</MenuItem>646 <MenuItem eventKey="2">Another action</MenuItem>647 <MenuItem eventKey="3" active>Active Item</MenuItem>648 <MenuItem divider />649 <MenuItem header>Dropdown Header</MenuItem>650 <MenuItem disabled eventKey="4">Disabled link</MenuItem>651 <MenuItem eventKey="5">Separated link</MenuItem>652 </SplitHoverButton>653 </div>654 </Col>655 </Row>656 <br />657 </Grid>658 </PanelBody>659 </Panel>660 </PanelContainer>661 );662 }663}664class SplitDropdownsAndDropupsInverse extends React.Component {665 render() {666 return (667 <PanelContainer noOverflow containerClasses='bg-pinkishred fg-white'>668 <Panel>669 <PanelHeader className='bg-pinkishred fg-white'>670 <Grid>671 <Row>672 <Col xs={12}>673 <h4>Split Button Dropdowns and Dropups (inverse)</h4>674 </Col>675 </Row>676 </Grid>677 </PanelHeader>678 <PanelBody>679 <Grid>680 <Row>681 <Col xs={6}>682 <div>683 <SplitButton inverse bsStyle='pinkishred' title='Basic' id='split-dropdown-basic-inverse'>684 <MenuItem eventKey="1">Action</MenuItem>685 <MenuItem eventKey="2">Another action</MenuItem>686 <MenuItem eventKey="3" active>Active Item</MenuItem>687 <MenuItem divider />688 <MenuItem disabled eventKey="4">Disabled link</MenuItem>689 <MenuItem eventKey="5">Separated link</MenuItem>690 </SplitButton>691 </div>692 <br />693 <div>694 <SplitButton inverse bsStyle='lightblue' title='With headers' id='split-dropdown-headers-inverse'>695 <MenuItem header>Dropdown Header</MenuItem>696 <MenuItem eventKey="1">Action</MenuItem>697 <MenuItem eventKey="2">Another action</MenuItem>698 <MenuItem eventKey="3" active>Active Item</MenuItem>699 <MenuItem divider />700 <MenuItem header>Dropdown Header</MenuItem>701 <MenuItem disabled eventKey="4">Disabled link</MenuItem>702 <MenuItem eventKey="5">Separated link</MenuItem>703 </SplitButton>704 </div>705 </Col>706 <Col xs={6} className='text-right'>707 <div>708 <SplitButton inverse bsStyle='pinkishred' title='Outlined' id='split-dropdown-outlined-inverse' pullRight>709 <MenuItem eventKey="1">Action</MenuItem>710 <MenuItem eventKey="2">Another action</MenuItem>711 <MenuItem eventKey="3" active>Active Item</MenuItem>712 <MenuItem divider />713 <MenuItem disabled eventKey="4">Disabled link</MenuItem>714 <MenuItem eventKey="5">Separated link</MenuItem>715 </SplitButton>716 </div>717 <br />718 <div>719 <SplitButton inverse bsStyle='orange' title='Disabled' id='split-dropdown-disabled-inverse' disabled>720 <MenuItem header>Dropdown Header</MenuItem>721 <MenuItem eventKey="1">Action</MenuItem>722 <MenuItem eventKey="2">Another action</MenuItem>723 <MenuItem eventKey="3" active>Active Item</MenuItem>724 <MenuItem divider />725 <MenuItem header>Dropdown Header</MenuItem>726 <MenuItem disabled eventKey="4">Disabled link</MenuItem>727 <MenuItem eventKey="5">Separated link</MenuItem>728 </SplitButton>729 </div>730 </Col>731 </Row>732 <hr className='border-lightred' />733 <Row>734 <Col xs={6}>735 <div>736 <SplitButton inverse bsStyle='darkgreen45' title='Basic' id='split-dropdown-basic-dropup-inverse' dropup>737 <MenuItem eventKey="1">Action</MenuItem>738 <MenuItem eventKey="2">Another action</MenuItem>739 <MenuItem eventKey="3" active>Active Item</MenuItem>740 <MenuItem divider />741 <MenuItem disabled eventKey="4">Disabled link</MenuItem>742 <MenuItem eventKey="5">Separated link</MenuItem>743 </SplitButton>744 </div>745 <br />746 <div>747 <SplitButton inverse bsStyle='lightblue' title='With headers' id='split-dropdown-headers-dropup-inverse' dropup>748 <MenuItem header>Dropdown Header</MenuItem>749 <MenuItem eventKey="1">Action</MenuItem>750 <MenuItem eventKey="2">Another action</MenuItem>751 <MenuItem eventKey="3" active>Active Item</MenuItem>752 <MenuItem divider />753 <MenuItem header>Dropdown Header</MenuItem>754 <MenuItem disabled eventKey="4">Disabled link</MenuItem>755 <MenuItem eventKey="5">Separated link</MenuItem>756 </SplitButton>757 </div>758 </Col>759 <Col xs={6} className='text-right'>760 <div>761 <SplitButton inverse bsStyle='darkgreen45' title='Outlined' id='split-dropdown-outlined-dropup-inverse' pullRight dropup>762 <MenuItem eventKey="1">Action</MenuItem>763 <MenuItem eventKey="2">Another action</MenuItem>764 <MenuItem eventKey="3" active>Active Item</MenuItem>765 <MenuItem divider />766 <MenuItem disabled eventKey="4">Disabled link</MenuItem>767 <MenuItem eventKey="5">Separated link</MenuItem>768 </SplitButton>769 </div>770 <br />771 <div>772 <SplitButton inverse bsStyle='orange' title='Disabled' id='split-dropdown-disabled-dropup-inverse' disabled dropup>773 <MenuItem header>Dropdown Header</MenuItem>774 <MenuItem eventKey="1">Action</MenuItem>775 <MenuItem eventKey="2">Another action</MenuItem>776 <MenuItem eventKey="3" active>Active Item</MenuItem>777 <MenuItem divider />778 <MenuItem header>Dropdown Header</MenuItem>779 <MenuItem disabled eventKey="4">Disabled link</MenuItem>780 <MenuItem eventKey="5">Separated link</MenuItem>781 </SplitButton>782 </div>783 </Col>784 </Row>785 <br />786 </Grid>787 </PanelBody>788 </Panel>789 </PanelContainer>790 );791 }792}793export default class Dropdowns extends React.Component {794 render() {795 return (796 <div>797 <Row>798 <Col sm={6} collapseRight>799 <DropdownsAndDropups />800 <DropdownsAndDropupsInverse />801 <DropdownsAndDropupsHover />802 </Col>803 <Col sm={6}>804 <SplitDropdownsAndDropups />805 <SplitDropdownsAndDropupsInverse />806 <SplitDropdownsAndDropupsHover />807 </Col>808 </Row>809 </div>810 );811 }...

Full Screen

Full Screen

menus.client.service.tests.js

Source:menus.client.service.tests.js Github

copy

Full Screen

1'use strict';2(function () {3 describe('Menus', function () {4 // Initialize global variables5 var scope,6 menuService;7 // Load the main application module8 beforeEach(module(ApplicationConfiguration.applicationModuleName));9 beforeEach(inject(function (_menuService_) {10 menuService = _menuService_;11 }));12 it('should have topbar added', function () {13 expect(menuService.menus.topbar).toBeDefined();14 });15 it('should have default roles to user and admin', function () {16 expect(menuService.defaultRoles).toEqual(['user', 'admin']);17 });18 describe('addMenu', function () {19 describe('with no options', function () {20 var menuId = 'menu1',21 menu;22 beforeEach(function () {23 menu = menuService.addMenu(menuId);24 });25 it('should return menu object', function () {26 expect(menu).toBeDefined();27 });28 it('should default roles', function () {29 expect(menu.roles).toEqual(menuService.defaultRoles);30 });31 it('should have empty items', function () {32 expect(menu.items).toEqual([]);33 });34 it('should set shouldRender to shouldRender function handle', function () {35 expect(menu.shouldRender()).toBeFalsy();36 });37 });38 describe('with options', function () {39 var menu,40 options = {41 roles: ['a', 'b', 'c'],42 items: ['d', 'e', 'f']43 };44 beforeEach(function () {45 menu = menuService.addMenu('menu1', options);46 });47 it('should set items to options.items list', function () {48 expect(menu.items).toBe(options.items);49 });50 it('should set roles to options.roles list', function () {51 expect(menu.roles).toBe(options.roles);52 });53 });54 });55 describe('shouldRender', function () {56 var menuOptions = {57 roles: ['*', 'menurole']58 },59 menu;60 beforeEach(function () {61 menu = menuService.addMenu('menu1', menuOptions);62 });63 describe('when logged out', function () {64 it('should render if menu is public', function () {65 expect(menu.shouldRender()).toBeTruthy();66 });67 it('should not render if menu is private', function () {68 menu = menuService.addMenu('menu1', {69 isPublic: false70 });71 expect(menu.shouldRender()).toBeFalsy();72 });73 });74 describe('when logged in', function () {75 var user = {76 roles: ['1', 'menurole', '2']77 };78 describe('menu with * role', function () {79 it('should render', function () {80 expect(menu.shouldRender(user)).toBeTruthy();81 });82 });83 describe('menu without * role', function () {84 beforeEach(function () {85 menu = menuService.addMenu('menu1', {86 roles: ['b', 'menurole', 'c']87 });88 });89 it('should render if user has same role as menu', function () {90 expect(menu.shouldRender(user)).toBeTruthy();91 });92 it('should not render if user has different roles', function () {93 user = {94 roles: ['1', '2', '3']95 };96 expect(menu.shouldRender(user)).toBeFalsy();97 });98 });99 });100 });101 describe('validateMenuExistence', function () {102 describe('when menuId not provided', function () {103 it('should throw menuId error', function () {104 expect(menuService.validateMenuExistence).toThrowError('MenuId was not provided');105 });106 });107 describe('when menu does not exist', function () {108 it('should throw no menu error', function () {109 var target = function () {110 menuService.validateMenuExistence('noMenuId');111 };112 expect(target).toThrowError('Menu does not exist');113 });114 });115 describe('when menu exists', function () {116 var menuId = 'menuId';117 beforeEach(function () {118 menuService.menus[menuId] = {};119 });120 it('should return truthy', function () {121 expect(menuService.validateMenuExistence(menuId)).toBeTruthy();122 });123 });124 });125 describe('removeMenu', function () {126 var menu = {127 id: 'menuId'128 };129 beforeEach(function () {130 menuService.menus[menu.id] = menu;131 menuService.validateMenuExistence = jasmine.createSpy();132 menuService.removeMenu(menu.id);133 });134 it('should remove existing menu from menus', function () {135 expect(menuService.menus).not.toContain(menu.id);136 });137 it('validates menu existance before removing', function () {138 expect(menuService.validateMenuExistence).toHaveBeenCalledWith(menu.id);139 });140 });141 describe('addMenuItem', function () {142 var menuId = 'menu1',143 subMenuItem1 = {144 title: 'sub1'145 },146 subMenuItem2 = {147 title: 'sub2'148 },149 menuItemOptions = {150 title: 'title',151 state: 'state',152 type: 'type',153 class: 'class',154 isPublic: false,155 roles: ['a', 'b'],156 position: 2,157 items: [subMenuItem1, subMenuItem2]158 },159 menu,160 menuItem;161 beforeEach(function () {162 menuService.validateMenuExistence = jasmine.createSpy();163 menuService.addSubMenuItem = jasmine.createSpy();164 menuService.addMenu(menuId, {165 roles: ['a', 'b']166 });167 menu = menuService.addMenuItem(menuId, menuItemOptions);168 menuItem = menu.items[0];169 });170 it('should validate menu existance', function () {171 expect(menuService.validateMenuExistence).toHaveBeenCalledWith(menuId);172 });173 it('should return the menu', function () {174 expect(menu).toBeDefined();175 });176 it('should set menu item shouldRender function', function () {177 expect(menuItem.shouldRender).toBeDefined();178 });179 describe('with options set', function () {180 it('should add menu item to menu', function () {181 expect(menu.items.length).toBe(1);182 });183 it('should set menu item title to options title', function () {184 expect(menuItem.title).toBe(menuItemOptions.title);185 });186 it('should set menu item state to options state', function () {187 expect(menuItem.state).toBe(menuItemOptions.state);188 });189 it('should set menu item type to options type', function () {190 expect(menuItem.type).toBe(menuItemOptions.type);191 });192 it('should set menu item class to options class', function () {193 expect(menuItem.class).toBe(menuItemOptions.class);194 });195 it('should set menu item position to options position', function () {196 expect(menuItem.position).toBe(menuItemOptions.position);197 });198 it('should call addSubMenuItem for each item in options', function () {199 expect(menuService.addSubMenuItem).toHaveBeenCalledWith(menuId, menuItemOptions.state, subMenuItem1);200 expect(menuService.addSubMenuItem).toHaveBeenCalledWith(menuId, menuItemOptions.state, subMenuItem2);201 });202 });203 describe('without options set', function () {204 beforeEach(function () {205 menu = menuService.addMenuItem(menuId);206 menuItem = menu.items[1];207 });208 it('should set menu item type to item', function () {209 expect(menuItem.type).toBe('item');210 });211 it('should set menu item title to empty', function () {212 expect(menuItem.title).toBe('');213 });214 it('should set menu item isPublic to false', function () {215 expect(menuItem.isPublic).toBeFalsy();216 });217 it('should set menu item roles to default roles', function () {218 expect(menuItem.roles).toEqual(menuService.defaultRoles);219 });220 it('should set menu item position to 0', function () {221 expect(menuItem.position).toBe(0);222 });223 });224 });225 describe('removeMenuItem', function () {226 var menuId = 'menuId',227 menuItemState = 'menu.state1',228 menuItemState2 = 'menu.state2',229 menu;230 beforeEach(function () {231 menuService.addMenu(menuId);232 menuService.addMenuItem(menuId, { state: menuItemState });233 menuService.addMenuItem(menuId, { state: menuItemState2 });234 menuService.validateMenuExistence = jasmine.createSpy();235 menu = menuService.removeMenuItem(menuId, menuItemState);236 });237 it('should return menu object', function () {238 expect(menu).not.toBeNull();239 });240 it('should validate menu existance', function () {241 expect(menuService.validateMenuExistence).toHaveBeenCalledWith(menuId);242 });243 it('should remove sub menu items with same state', function () {244 expect(menu.items.length).toBe(1);245 expect(menu.items[0].state).toBe(menuItemState2);246 });247 });248 describe('addSubMenuItem', function () {249 var subItemOptions = {250 title: 'title',251 state: 'sub.state',252 params: { p1: 'val1' },253 isPublic: false,254 roles: ['a', 'b'],255 position: 4256 };257 var menuId = 'menu1',258 menuItem1Options = {259 state: 'item1.state',260 items: [],261 isPublic: false262 },263 menuItem2Options = {264 state: 'item2.state2',265 items: [],266 isPublic: true,267 roles: ['a']268 },269 menuItem1,270 menuItem2,271 menuItem3,272 subItem1,273 subItem2,274 menu;275 beforeEach(function () {276 menuService.validateMenuExistence = jasmine.createSpy();277 menuService.addMenu(menuId);278 menuService.addMenuItem(menuId, menuItem1Options);279 menuService.addMenuItem(menuId, menuItem2Options);280 menuService.addMenuItem(menuId, { state: 'something.else' });281 menuService.addSubMenuItem(menuId, menuItem1Options.state, subItemOptions);282 menu = menuService.addSubMenuItem(menuId, menuItem1Options.state);283 menuItem1 = menu.items[0];284 menuItem2 = menu.items[1];285 menuItem3 = menu.items[2];286 subItem1 = menuItem1.items[0];287 subItem2 = menuItem1.items[1];288 });289 afterEach(function () {290 menuService.removeMenu(menuId);291 });292 it('should return menu object', function () {293 expect(menu).not.toBeNull();294 });295 it('should validate menu existance', function () {296 expect(menuService.validateMenuExistence).toHaveBeenCalledWith(menuId);297 });298 it('should not add sub menu item to menu item of different state', function () {299 expect(menuItem3.items.length).toBe(0);300 });301 it('should set shouldRender', function () {302 expect(subItem1.shouldRender).toBeDefined();303 });304 describe('with options set', function () {305 it('should add sub menu item to menu item', function () {306 expect(subItem1).toBeDefined();307 });308 it('should set title to options title', function () {309 expect(subItem1.title).toBe(subItemOptions.title);310 });311 it('should set state to options state', function () {312 expect(subItem1.state).toBe(subItemOptions.state);313 });314 it('should set roles to options roles', function () {315 expect(subItem1.roles).toEqual(subItemOptions.roles);316 });317 it('should set position to options position', function () {318 expect(subItem1.position).toEqual(subItemOptions.position);319 });320 it('should set params to options params', function () {321 expect(subItem1.params).toEqual(subItemOptions.params);322 });323 });324 describe('without optoins set', function () {325 it('should add sub menu item to menu item', function () {326 expect(subItem2).toBeDefined();327 });328 it('should set isPublic to parent isPublic', function () {329 expect(subItem2.isPublic).toBe(menuItem1.isPublic);330 });331 it('should set title to blank', function () {332 expect(subItem2.title).toBe('');333 });334 it('should set state to blank', function () {335 expect(subItem2.state).toBe('');336 });337 it('should set roles to parent roles', function () {338 expect(subItem2.roles).toEqual(menuItem1.roles);339 });340 it('should set position to 0', function () {341 expect(subItem2.position).toBe(0);342 });343 });344 describe('then removeSubMenuItem', function () {345 beforeEach(function () {346 menuService.validateMenuExistence = jasmine.createSpy();347 menu = menuService.removeSubMenuItem(menuId, subItem1.state);348 });349 it('should validate menu existance', function () {350 expect(menuService.validateMenuExistence).toHaveBeenCalledWith(menuId);351 });352 it('should return menu object', function () {353 expect(menu).toBeDefined();354 });355 it('should remove sub menu item', function () {356 expect(menuItem1.items.length).toBe(1);357 expect(menuItem1.items[0].state).toEqual(subItem2.state);358 });359 });360 });361 });...

Full Screen

Full Screen

menu_lists.js

Source:menu_lists.js Github

copy

Full Screen

1/*Autogenerated from Menu.csv on 2015-05-20 at 10:52:38.279000*/2menu = menu_sub("Menu", "fa fa-bars");3menu_0 = menu_sub("Academics", "fa fa-book");4menu_0_0 = menu_external("Areas of Study", "fa fa-arrow-right", "http://www.western.edu/academics/undergraduate-areas-study");5menu_0.items.append(menu_0_0);6menu_0_1 = menu_external("Graduate Programs", "fa fa-graduation-cap", "http://www.western.edu/academics/graduate-programs-western");7menu_0.items.append(menu_0_1);8menu_0_2 = menu_external("Extended Studies", "fa fa-globe", "http://www.western.edu/academics/extended-studies");9menu_0.items.append(menu_0_2);10menu_0_3 = menu_external("University Catalog", "fa fa-book", "http://www.western.edu/future-students/accepted-students/office-registrar/university-catalog");11menu_0.items.append(menu_0_3);12menu_0_4 = menu_external("Academic Calendar", "fa fa-calendar", "http://www.western.edu/academics/academic-calendar");13menu_0.items.append(menu_0_4);14menu_1 = menu_sub("Athletics", "fa fa-bicycle");15menu.items.append(menu_1);16menu_1_0 = menu_sub("NCAA Sports", "fa fa-futbol-o");17menu_1.items.append(menu_1_0);18menu_1_0_0 = menu_external("Football", "fa fa-skyatlas", "http://www.gomountaineers.com/");19menu_1_0.items.append(menu_1_0_0);20menu_1_0_1 = menu_external("Basketball", "fa fa-trophy", "http://www.gomountaineers.com/");21menu_1_0.items.append(menu_1_0_1);22menu_1_0_2 = menu_external("Wrestling", "fa fa-bell", "http://www.gomountaineers.com/");23menu_1_0.items.append(menu_1_0_2);24menu_1_0_3 = menu_external("Track", "fa fa-bolt", "http://www.gomountaineers.com/");25menu_1_0.items.append(menu_1_0_3);26menu_1_0_4 = menu_external("Swimming", "fa fa-life-ring", "http://www.gomountaineers.com/");27menu_1_0.items.append(menu_1_0_4);28menu_1_0_5 = menu_external("Soccer", "fa fa-futbol-o", "http://www.gomountaineers.com/");29menu_1_0.items.append(menu_1_0_5);30menu_1_1 = menu_sub("Mountain Sports", "fa fa-motorcycle");31menu_1.items.append(menu_1_1);32menu_1_1_0 = menu_external("Ski and Snowboard", "fa fa-tree", "http://wscumountainsports.com/come-ski-with-the-team/");33menu_1_1.items.append(menu_1_1_0);34menu_1_1_1 = menu_external("Mountain Biking", "fa fa-bicycle", "http://wscumountainsports.com/new-mountain-biking/");35menu_1_1.items.append(menu_1_1_1);36menu_1_1_2 = menu_external("Trail Running", "fa fa-bicycle", "http://wscumountainsports.com/trail-running/");37menu_1_1.items.append(menu_1_1_2);38menu_2 = menu_external("Schedule A Visit", "fa fa-calendar", "http://www.western.edu/future-students/visiting-campus/visit-western");39menu.items.append(menu_2);40menu_3 = menu_sub("Student Life", "fa fa-users");41menu.items.append(menu_3);42menu_3_0 = menu_external("Apply Now!", "fa fa-star", "http://www.western.edu/future-students/apply-now-western");43menu_3.items.append(menu_3_0);44menu_3_1 = menu_external("Tuition and Fees", "fa fa-credit-card", "http://www.western.edu/future-students/financing-your-education/tuition-and-fees-western");45menu_3.items.append(menu_3_1);46menu_3_2 = menu_sub("Visit Campus", "fa fa-university");47menu_3.items.append(menu_3_2);48menu_3_2_0 = menu_external("Setup Visit", "fa fa-check-square", "http://www.western.edu/future-students/visiting-campus/visit-western");49menu_3_2.items.append(menu_3_2_0);50menu_3_2_1 = menu_external("Contact Us", "fa fa-phone", "http://www.western.edu/future-students/contact-admissions/meet-admissions-counselors");51menu_3_2.items.append(menu_3_2_1);52menu_3_3 = menu_sub("Activities", "fa fa-smile-o");53menu_3.items.append(menu_3_3);54menu_3_3_0 = menu_sub("Clubs", "fa fa-music");55menu_3_3.items.append(menu_3_3_0);56menu_3_3_0_0 = menu_external("Academic Clubs", "fa fa-university", "http://www.western.edu/current-students/student-activities/academic-clubs-and-honor-societies");57menu_3_3_0.items.append(menu_3_3_0_0);58menu_3_3_0_1 = menu_external("Club Sports", "fa fa-futbol-o", "http://www.western.edu/current-students/campus-recreation/club-sports");59menu_3_3_0.items.append(menu_3_3_0_1);60menu_3_3_0_2 = menu_external("Cultural", "fa fa-euro", "http://www.western.edu/current-students/other-student-activities/kwsb-911fm");61menu_3_3_0.items.append(menu_3_3_0_2);62menu_3_3_0_3 = menu_external("Student Government", "fa fa-gavel", "http://www.western.edu/current-students/student-government-association/sga-documents");63menu_3_3_0.items.append(menu_3_3_0_3);64menu_3_3_0_4 = menu_external("KWSB Radio", "fa fa-headphones", "http://www.western.edu/current-students/other-student-activities/kwsb-911fm");65menu_3_3_0.items.append(menu_3_3_0_4);66menu_3_3_1 = menu_external("Recreation", "fa fa-gamepad", "http://www.western.edu/future-students/life-western/recreation");67menu_3_3.items.append(menu_3_3_1);68menu_3_4 = menu_sub("Housing", "fa fa-home");69menu_3.items.append(menu_3_4);70menu_3_4_0 = menu_sub("On Campus", "fa fa-building");71menu_3_4.items.append(menu_3_4_0);72menu_3_4_0_0 = menu_location("Escalante", "fa fa-home", "#excalante");73menu_3_4_0.items.append(menu_3_4_0_0);74menu_3_4_0_1 = menu_location("Mears", "fa fa-home", "#mears");75menu_3_4_0.items.append(menu_3_4_0_1);76menu_3_4_0_2 = menu_location("Ute", "fa fa-home", "#ute");77menu_3_4_0.items.append(menu_3_4_0_2);78menu_3_4_0_3 = menu_location("Pinnacles", "fa fa-home", "#pinnacles");79menu_3_4_0.items.append(menu_3_4_0_3);80menu_3_5 = menu_sub("Nearby", "fa fa-road");81menu_3.items.append(menu_3_5);82menu_3_5_0 = menu_3_5.items.append(menu_3_5_0);83menu_3_5_1 = menu_3_5.items.append(menu_3_5_1);84menu_3_5_2 = menu_3_5.items.append(menu_3_5_2);85menu_3_5_3 = menu_3_5.items.append(menu_3_5_3);86menu_4 = menu_sub("Go To", "fa fa-street-view");87menu.items.append(menu_4);88menu_4_0 = menu_location("Borick", "fa fa-university", "#borick");89menu_4.items.append(menu_4_0);90menu_4_1 = menu_location("Chipeta Hall", "fa fa-university", "#chipeta");91menu_4.items.append(menu_4_1);92menu_4_2 = menu_location("Escalante", "fa fa-university", "#escalante");93menu_4.items.append(menu_4_2);94menu_4_3 = menu_location("Hurst Hall", "fa fa-university", "#hurst");95menu_4.items.append(menu_4_3);96menu_4_4 = menu_location("Kelley Hall", "fa fa-university", "#kelley");97menu_4.items.append(menu_4_4);98menu_4_5 = menu_location("Library", "fa fa-university", "#library");99menu_4.items.append(menu_4_5);100menu_4_6 = menu_location("Mears Hall", "fa fa-university", "#mears");101menu_4.items.append(menu_4_6);102menu_4_7 = menu_location("Mountaineer Bowl", "fa fa-university", "#mountaineer");103menu_4.items.append(menu_4_7);104menu_4_8 = menu_location("Pinnacles", "fa fa-university", "#pinnacles");105menu_4.items.append(menu_4_8);106menu_4_9 = menu_location("Quigley Hall", "fa fa-university", "#quigley");107menu_4.items.append(menu_4_9);108menu_4_10 = menu_location("Taylor Hall", "fa fa-university", "#taylor");109menu_4.items.append(menu_4_10);110menu_4_11 = menu_location("University Center", "fa fa-university", "#university");111menu_4.items.append(menu_4_11);112menu_4_12 = menu_location("Ute Hall", "fa fa-university", "#ute");113menu_4.items.append(menu_4_12);114menu_4_13 = menu_location("Fieldhouse", "fa fa-university", "#fieldhouse"); ...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var menu = require('argosy-menu')2var argosy = require('argosy')3var argosyPattern = require('argosy-pattern')4var argosyService = require('argosy-service')5var argosyServiceMenu = require('argosy-service-menu')6var menuService = argosyServiceMenu(argosy(), { menu: menu })7menuService.accept({ menu: argosyPattern.match('menu') }, function (msg, cb) {8 cb(null, msg.menu)9})10menuService.listen(3000)11var menu = require('argosy-menu')12var argosy = require('argosy')13var argosyPattern = require('argosy-pattern')14var argosyService = require('argosy-service')15var argosyServiceMenu = require('argosy-service-menu')16var menuService = argosyServiceMenu(argosy(), { menu: menu })17menuService.accept({ menu: argosyPattern.match('menu') }, function (msg, cb) {18 cb(null, msg.menu)19})20menuService.listen(3000)21var menu = require('argosy-menu')22var argosy = require('argosy')23var argosyPattern = require('argosy-pattern')24var argosyService = require('argosy-service')25var argosyServiceMenu = require('argosy-service-menu')26var menuService = argosyServiceMenu(argosy(), { menu: menu })27menuService.accept({ menu: argosyPattern.match('menu') }, function (msg, cb) {28 cb(null, msg.menu)29})30menuService.listen(3000)31var menu = require('argosy-menu')32var argosy = require('argosy')33var argosyPattern = require('argosy-pattern')34var argosyService = require('argosy-service')35var argosyServiceMenu = require('argosy-service-menu')36var menuService = argosyServiceMenu(argosy(), { menu: menu })37menuService.accept({ menu: argosyPattern.match('menu') },

Full Screen

Using AI Code Generation

copy

Full Screen

1var argosy = require('argosy')();2argosy.use(require('argosy-pattern')());3argosy.use(require('argosy-menu')());4var argosy = require('argosy')();5argosy.use(require('argosy-pattern')());6argosy.use(require('argosy-menu')());7var argosy = require('argosy')();8argosy.use(require('argosy-pattern')());9argosy.use(require('argosy-menu')());10var argosy = require('argosy')();11argosy.use(require('argosy-pattern')());12argosy.use(require('argosy-menu')());13var argosy = require('argosy')();14argosy.use(require('argosy-pattern')());15argosy.use(require('argosy-menu')());16var argosy = require('argosy')();17argosy.use(require('argosy-pattern')());18argosy.use(require('argosy-menu')());19var argosy = require('argosy')();20argosy.use(require('argosy-pattern')());21argosy.use(require('argosy-menu')());22var argosy = require('argosy')();23argosy.use(require('argosy-pattern')());24argosy.use(require('argosy-menu')());25var argosy = require('argosy')();26argosy.use(require('argosy-pattern')());27argosy.use(require('argosy-menu')());28var argosy = require('argosy')();29argosy.use(require('argosy-pattern')());30argosy.use(require('argosy-menu')());31var argosy = require('argosy')();32argosy.use(require('argosy-pattern')());

Full Screen

Using AI Code Generation

copy

Full Screen

1var argosy = require('argosy')2var argosyPattern = require('argosy-pattern')3var menu = require('argosy-service/menu')4var pattern = argosyPattern({5 menu: {6 }7})8var service = argosy()9service.pipe(menu(pattern, {10 {11 },12 {13 }14})).pipe(service)15service.on('error', function (err) {16 console.error(err)17})18service.act('menu', function (err, menu) {19 console.log(menu)20})

Full Screen

Using AI Code Generation

copy

Full Screen

1var argosy = require('argosy')2var menu = require('argosy-menu')3var _ = require('lodash')4var menu = require('argosy-menu')5var argosy = require('argosy')6var menu = require('argosy-menu')7var _ = require('lodash')8var argosy = require('argosy')9var menu = require('argosy-menu')10var _ = require('lodash')11var argosy = require('argosy')12var menu = require('argosy-menu')13var _ = require('lodash')14var argosy = require('argosy')15var menu = require('argosy-menu')16var _ = require('lodash')17var argosy = require('argosy')18var menu = require('argosy-menu')19var _ = require('lodash')20var argosy = require('argosy')21var menu = require('argosy-menu')22var _ = require('lodash')23var argosy = require('argosy')24var menu = require('argosy-menu')25var _ = require('lodash')26var argosy = require('argosy')27var menu = require('argosy-menu')28var _ = require('lodash')29var argosy = require('argosy')30var menu = require('argosy-menu')31var _ = require('lodash')32var argosy = require('argosy')33var menu = require('argosy-menu')34var _ = require('lodash')35var argosy = require('argosy')36var menu = require('argosy-menu')37var _ = require('lodash')38var argosy = require('argosy')39var menu = require('argosy-menu')40var _ = require('lodash')41var argosy = require('argosy')42var menu = require('argosy-menu')43var _ = require('lodash')44var argosy = require('argosy')45var menu = require('argosy-menu')46var _ = require('lodash')47var argosy = require('argosy')48var menu = require('argosy-menu')49var _ = require('lodash')50var argosy = require('argosy')51var menu = require('argosy-menu')52var _ = require('lodash')53var argosy = require('argosy')

Full Screen

Using AI Code Generation

copy

Full Screen

1var menu = require('argos').menu;2menu.add('test', 'Test', function() {3 console.log('test');4});5menu.add('test2', 'Test2', function() {6 console.log('test2');7});8menu.add('test3', 'Test3', function() {9 console.log('test3');10});11menu.add('test4', 'Test4', function() {12 console.log('test4');13});14menu.add('test5', 'Test5', function() {15 console.log('test5');16});17menu.add('test6', 'Test6', function() {18 console.log('test6');19});20menu.add('test7', 'Test7', function() {21 console.log('test7');22});23menu.add('test8', 'Test8', function() {24 console.log('test8');25});26menu.add('test9', 'Test9', function() {27 console.log('test9');28});29menu.add('test10', 'Test10', function() {30 console.log('test10');31});32menu.add('test11', 'Test11', function() {33 console.log('test11');34});35menu.add('test12', 'Test12', function() {36 console.log('test12');37});38menu.add('test13', 'Test13', function() {39 console.log('test13');40});41menu.add('test14', 'Test14', function() {42 console.log('test14');43});44menu.add('test15', 'Test15', function() {45 console.log('test15');46});47menu.add('test16', 'Test16', function() {48 console.log('test16');49});50menu.add('test17', 'Test17', function() {51 console.log('test17');52});53menu.add('test18', 'Test18', function() {54 console.log('test18');55});56menu.add('test19', 'Test19', function() {57 console.log('test19');58});59menu.add('test20', 'Test20', function() {60 console.log('test20');61});62menu.add('test21', 'Test21', function() {63 console.log('test21');64});65menu.add('test22', 'Test22', function() {66 console.log('test22');67});68menu.add('test23', 'Test23', function() {69 console.log('test23');70});71menu.add('test24', 'Test

Full Screen

Using AI Code Generation

copy

Full Screen

1var argosy = require('argosy');2var menu = argosy.patterns.menu;3var argosyService = argosy();4argosyService.pipe(menu({5 'ping': function (cb) {6 cb(null, 'pong');7 }8})).pipe(argosyService.acceptor);9var argosy = require('argosy');10var menu = argosy.patterns.menu;11var argosyService = argosy();12argosyService.pipe(menu({13 'ping': function (cb) {14 cb(null, 'pong');15 }16})).pipe(argosyService.acceptor);17var argosy = require('argosy');18var menu = argosy.patterns.menu;19var argosyService = argosy();20argosyService.pipe(menu({21 'ping': function (cb) {22 cb(null, 'pong');23 }24})).pipe(argosyService.acceptor);25var argosy = require('argosy');26var menu = argosy.patterns.menu;27var argosyService = argosy();28argosyService.pipe(menu({29 'ping': function (cb) {30 cb(null, 'pong');31 }32})).pipe(argosyService.acceptor);33var argosy = require('argosy');34var menu = argosy.patterns.menu;35var argosyService = argosy();36argosyService.pipe(menu({37 'ping': function (cb) {38 cb(null, 'pong');39 }40})).pipe(argosyService.acceptor);41var argosy = require('argosy');42var menu = argosy.patterns.menu;43var argosyService = argosy();44argosyService.pipe(menu({45 'ping': function (cb) {46 cb(null, 'pong');47 }48})).pipe(argosyService.acceptor);

Full Screen

Using AI Code Generation

copy

Full Screen

1var argosy = require('argosy')2var menu = require('argosy-menu')3var argosyPattern = argosy()4argosyPattern.use(menu({5 'hello': function (msg, done) {6 done(null, 'world')7 }8}))9argosyPattern.listen(8000)10var argosy = require('argosy')11var menu = require('argosy-menu')12var argosyPattern = argosy()13argosyPattern.use(menu({14 'hello': function (msg, done) {15 done(null, 'world')16 }17}))18argosyPattern.listen(8001)

Full Screen

Using AI Code Generation

copy

Full Screen

1var argosy = require('argosy')2var argosyPattern = require('argosy-pattern')3var menu = argosy.menu({4 'hello': argosyPattern.value('Hello World!')5})6menu.listen(3000)7#### `argosyPattern.value(value)`8var argosy = require('argosy')9var argosyPattern = require('argosy-pattern')10var menu = argosy.menu({11 'hello': argosyPattern.value('Hello World!')12})13menu.listen(3000)14#### `argosyPattern.object(pattern)`15var argosy = require('argosy')16var argosyPattern = require('argosy-pattern')17var menu = argosy.menu({18 'hello': argosyPattern.object({19 name: argosyPattern.value('John Doe')20 })21})22menu.listen(3000)23#### `argosyPattern.array(pattern)`24var argosy = require('argosy')25var argosyPattern = require('argosy-pattern')26var menu = argosy.menu({

Full Screen

Using AI Code Generation

copy

Full Screen

1var argosy = require('argosy')()2argosy.accept({3 menu: function (options, callback) {4 callback(null, {5 })6 }7})8argosy.pipe(argosy).pipe(process.stdout)9var argosy = require('argosy')()10argosy.pipe(argosy).pipe(process.stdout)11argosy.send({12 menu: {}13}, function (err, menu) {14 console.log(menu)15})16### var argosy = require('argosy')([options])17Create an instance of argosy. Options are passed to [pull-stream](

Full Screen

Using AI Code Generation

copy

Full Screen

1argosy.menu('menu', function (menu, callback) {2 { name: 'Item 1', value: 1 },3 { name: 'Item 2', value: 2 },4 { name: 'Item 3', value: 3 }5 menu(items, callback)6})7argosy.menu('menu', function (menu, callback) {8 { name: 'Item 1', value: 1 },9 { name: 'Item 2', value: 2 },10 { name: 'Item 3', value: 3 }11 menu(items, callback)12})13argosy.menu('menu', function (menu, callback) {14 { name: 'Item 1', value: 1 },15 { name: 'Item 2', value: 2 },16 { name: 'Item 3', value: 3 }17 menu(items, callback)18})19argosy.menu('menu', function (menu, callback) {20 { name: 'Item 1', value: 1 },21 { name: 'Item 2', value: 2 },22 { name: 'Item 3', value: 3 }23 menu(items, callback)24})25argosy.menu('menu', function (menu, callback) {26 { name: 'Item 1', value: 1 },27 { name: 'Item 2', value: 2 },28 { name: 'Item 3', value: 3 }29 menu(items, callback)30})31argosy.menu('menu', function (menu, callback) {32 { name: 'Item 1', value: 1 },33 { name: 'Item 2', value: 2 },34 { name: 'Item 3', value: 3 }35 menu(items, callback

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run argos automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful