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

Add Popover / Popup component #386

Open
foot opened this issue Sep 25, 2018 · 4 comments
Open

Add Popover / Popup component #386

foot opened this issue Sep 25, 2018 · 4 comments
Labels
component/modal Issues related to modal/overlay components feature Indicates that issue is related to new end user functionality

Comments

@foot
Copy link
Contributor

foot commented Sep 25, 2018

const PopupExample = () => (
  <Popup trigger={<Button icon='add' />} content='Add users to your feed' />
)
<Button onClick={this.handleClick}>Holy guacamole!</Button>
<Overlay
  show={this.state.show}
  target={this.state.target}
  placement="bottom"
  container={this}
  containerPadding={20}
>
  <Popover id="popover-contained" title="Popover bottom">
    <strong>Holy guacamole!</strong> Check this info.
  </Popover>
</Overlay>
<Button
  aria-owns={open ? 'simple-popper' : null}
  aria-haspopup="true"
  variant="contained"
  onClick={this.handleClick}
  >
    Open Popover
</Button>
<Popover
  id="simple-popper"
  open={open}
  anchorEl={anchorEl}
  onClose={this.handleClose}
  anchorOrigin={{
    vertical: 'bottom',
    horizontal: 'center',
  }}
  transformOrigin={{
    vertical: 'top',
    horizontal: 'center',
 }}
>
  <Typography className={classes.typography}>The content of the Popover.</Typography>
</Popover>
@foot foot added the feature Indicates that issue is related to new end user functionality label Sep 25, 2018
@guyfedwards
Copy link
Contributor

A good library is: https://popper.js.org/tooltip-examples.html
The underlying library is popper.js but they took common usecases and made tooltip.js

@fbarl fbarl added the component/modal Issues related to modal/overlay components label Oct 23, 2018
@farhaanbukhsh
Copy link

hey this seems interesting can I take this up?

@foot
Copy link
Contributor Author

foot commented Oct 25, 2018

Hi @farhaanbukhsh. Thanks for interest in this one!

We've actually implemented a basic version of this already. I'll try and push it up to ui-components on Monday. It could use some improvements though so if you were interested in iterating on it and/or sharing ideas you have about how to make it better that would be great.

Will give you a ping soon!

@farhaanbukhsh
Copy link

I am all up for it 😊 I am up for bug fixes too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/modal Issues related to modal/overlay components feature Indicates that issue is related to new end user functionality
Projects
None yet
Development

No branches or pull requests

4 participants