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

Popover (brainstorming) #175

Open
nikgraf opened this issue Aug 24, 2015 · 3 comments
Open

Popover (brainstorming) #175

nikgraf opened this issue Aug 24, 2015 · 3 comments

Comments

@nikgraf
Copy link
Owner

nikgraf commented Aug 24, 2015

Initial Component API research

with @federicare

State handling

function togglePopover() {
  this.setState({
    isOpen: !this.state.isOpen;
  });
}
<button onClick={ this.togglePopover }>
  Toggle
</button>
<Popover isOpen={ this.state.isOpen }>
  Hello Alex <button>Donate!</button><p>Screw alex</p>
</Popover>

Bootstrap (React)way

const popover = (
  <Popover><strong>Holy guacamole!</strong> Check this info.</Popover>
);

<OverlayTrigger placement='bottom' overlay={popover}>
  <button>Holy guacamole!</button>
</OverlayTrigger>

Dedicated subcomponents

<Popover>
  <Trigger><button>Press Me!</button></Trigger>
  <Content>
    Hello Alex <button>Donate!</button><p>Screw alex</p>
  </Content>
</Popover>

Data Trigger

<button data-trigger={ "abc" }>Hello</button>
<Popover id="abc">
  Hello Alex <button>Donate!</button><p>Screw alex</p>
</Popover>
@jpuri
Copy link
Collaborator

jpuri commented Aug 24, 2015

This might be related: #151, though not same.

@nikgraf
Copy link
Owner Author

nikgraf commented Aug 24, 2015

@jpuri for sure

btw I added a first skeleton commit in here: https://github.com/nikgraf/belle/tree/popover

@jpuri
Copy link
Collaborator

jpuri commented Aug 25, 2015

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants