Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support all dropdown types #4

Closed
levithomason opened this issue Oct 2, 2015 · 4 comments · Fixed by #168
Closed

Support all dropdown types #4

levithomason opened this issue Oct 2, 2015 · 4 comments · Fixed by #168
Milestone

Comments

@levithomason
Copy link
Member

http://semantic-ui.com/modules/dropdown.html

@levithomason
Copy link
Member Author

We have basic support for dropdowns using the select element. However, there are more cases to support which use other HTML elements.

@levithomason levithomason changed the title Build dropdown component Support all dropdown types Oct 17, 2015
@levithomason
Copy link
Member Author

Brain dump per our dropdown API planning. This spec should cover all cases of dropdowns:

import React, {Component} from 'react';
import {Dropdown, DropdownItem} from 'stardust';

export default class DropdownMultipleSelectionExample extends Component {
  render() {
    return (
      <div>
        {/* Adding a button bar */}
        <Buttons>
          <Button>Save</Button>
          <Dropdown className='floating icon button' text=''>
            ...
          </Dropdown>
        </Buttons>

        <Dropdown text='File' className='floating labeled icon dropdown button' icon='add user' multiple name='skills'>
          {/* a Menu is added here automatically, to contain the items */}

          {/* minimal item definition */}
          <DropdownItem value='check-it-out' text='Check it out' />
          <DropdownItem value='check-it-out'>Check it out</DropdownItem>

          {/* item description (gray text to the right of the text) */}
          <DropdownItem text='Check it out' description='this is gray'/>

          <Divider />

          <DropdownItem value='ruby'>
            Ruby
            <DropdownMenu className='left'>
              <Input className='icon' icon='search' />
              <Header icon='foo'>Yo</Header>

              <Divider />
              <DropdownItem value='' />
            </DropdownMenu>
          </DropdownItem>
          <DropdownItem value='MongoDB'>MongoDB</DropdownItem>
          <DropdownItem value='AngularJS'>AngularJS</DropdownItem>
        </Dropdown>

        <Dropdown>
          <DropdownItem value='Ruby' text='Ruby' />
          <DropdownItem value='MongoDB' text='MongoDB' />
          <DropdownItem value='AngularJS' text='AngularJS' />
          <DropdownItem value=''>
            <Image />
            This is an option
            <DropdownMenu>
              <DropdownItem value='' />
            </DropdownMenu>
          </DropdownItem>
        </Dropdown>
      </div>
    );
  }
}

@tslater
Copy link
Contributor

tslater commented Jul 23, 2016

I'm trying to import DropdownItem to do this in my project, but it looks like it's no longer being exported?

@levithomason
Copy link
Member Author

Correct, I'll address this in the new issue posted #346.

@Semantic-Org Semantic-Org locked and limited conversation to collaborators Jul 23, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants