@contextual-learning/elsa-bottom-sheet
ELSA Bottom Sheet
Last updated 2 years ago by tsjordan .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @contextual-learning/elsa-bottom-sheet 
SYNC missed versions from official npm registry.

react-bottom-sheet

Installation

$ npm install elsa-bottom-sheet --save

Example

import React from 'react';
import BottomSheet from 'elsa-bottom-sheet';

export default class Test extends React.Component {
  componentWillMount() {
    this.setState({
      showSheet: false
    });
  }

  render() {
    return (
      <BottomSheet
        open={this.state.showSheet}
        onRequestClose={() => this.setState({ showSheet: false })}
      >
        <div>
          <h1>Bottom sheet modal content</h1>
          <ul>
            <li>Animates from bottom to top</li>
            <li>
              If the content height is more than the height of the device it
              will be scrollable.
            </li>
            <li>Clicking on the grey area will close the modal</li>
          </ul>
        </div>
      </BottomSheet>
    );
  }
}
Property Type Default Description
className string Bottom sheet content className.
open bool false If set to true the bottom sheet will open.
onRequestClose* func This method will be called when an action is made to close this bottom sheet.
For example clicking on the overlay.
zIndex number css z-index value for the bottom sheet
maxHeight string '100vh' css max-height value for the bottom sheet.
Numbers are not allowed, you have to pass 10px as a string instead
minHeight string css min-height value for the bottom sheet.
Numbers are not allowed, you have to pass 10px as a string instead
bottomSheetHeader element If passed this element will render above the content.
bottomSheetFooter element If passed this element will render under the content.

Contributing

To contribute, follow these steps:

  • Fork this repo.
  • Clone your fork.
  • Run npm install
  • Run npm start
  • Goto localhost:3000
  • Add your patch then push to your fork and submit a pull request

License

MIT

Current Tags

  • 2.0.3                                ...           latest (2 years ago)

4 Versions

  • 2.0.3                                ...           2 years ago
  • 2.0.2                                ...           2 years ago
  • 2.0.1                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 8
Last Day 0
Last Week 4
Last Month 2
Dependencies (16)
Dev Dependencies (12)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |