react-micro-flyout

1.0.1 • Public • Published

react-micro-flyout

A react component that provides minimum feature for flyout (like as tooltip, popup, balloon UI).

Install

$ npm install --save react-micro-flyout

Example

import React from 'react';
import Flyout from 'react-micro-flyout';

class Example extends React.Component {
  constructor(props) {
    super(props);
    this.state = { open: false };
  }

  render() {
    return (
      <div style={{ position: 'relative' }}>
        <button onClick={() => this.setState({ open: true })}>Open</button>

        <Flyout
          style={{ width: "100px", border: '1px solid gray', position: 'absolute', top: '20px' }}
          open={this.state.open}
          onRequestClose={() => this.setState({ open: false })}>
          <p>some contents</p>
        </Flyout>
      </div>
    );
  }
}

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i react-micro-flyout

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • hokaccha