npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-sheets-bottom

v1.2.0

Published

Kind of Sheets Bottom for react native

Downloads

592

Readme

react-native-sheets-bottom swipeable, easy to use bottom panel for your React Native projects. You can extend panel by swiping up, make it small or close by swiping down with pan gestures. Feel free to redesign inside of the panel.

NOTE: It currently supports pattern the modal-bottom-sheet. Roadmap is to support expand to full screen.

npm version

⚙️ Installation

$ npm i react-native-sheets-bottom

🚀 How to use

import React from 'react';
import { StyleSheet, Text, View } from 'react-native';

import SwipeablePanel from 'react-native-sheets-bottom';

export default class App extends Component {
  constructor(props) {
    super(props);
    this.state = {
      swipeablePanelActive: false,
    };
  }

  componentDidMount = () => {
    this.openPanel();
  };

  openPanel = () => {
    this.setState({ swipeablePanelActive: true });
  };

  closePanel = () => {
    this.setState({ swipeablePanelActive: false });
  };

  render() {
    return (
      <View style={styles.container}>
        <Text style={styles.welcome}>Welcome to React Native!</Text>
        <Text style={styles.instructions}>To get started, edit App.js</Text>
        <SwipeablePanel
          fullWidth
          isActive={this.state.swipeablePanelActive}
          onClose={this.closePanel}
          onPressCloseButton={this.closePanel}
        >
          <PanelContent /> {/* Your Content Here */}
        </SwipeablePanel>
      </View>
    );
  }
}

☝️ Options

| Properties | Type | Description | Default | | ----------------------- | ---------- | -------------------------------------------------------- | ------- | | barStyle | Object | Use this prop to override bar style | {} | | closeIconStyle | Object | Use this prop to override close button icon style | {} | | closeOnTouchOutside | bool | Set true if you want to close panel by touching outside | false | | closeRootStyle | Object | Use this prop to override close button background style | {} | | fullWidth | bool | Set true if you want to make full with panel | false | | gestureThreshold | Number | Top bar pan gesture threshold | 100 | | isActive | bool | Show/Hide the panel | false | | noBackdropOpacity | bool | Set true if you want to disable black background opacity | false | | noBar | bool | Set true if you want to remove gray bar | false | | onClose | Function | Fired when the panel is closed | | | onlyLarge | bool | Set true if you want to let panel open just large mode | false | | openLarge | bool | Set true if you want to open panel large by default | false | | showCloseButton | bool | Set true if you want to show close button | | | style | Object | Use this prop to override panel style | {} |

TODO list since fork

  • (DONE) create gestureThreshold new prop
  • (DONE) Configure Travis CI and semantic-release so we automatically release new version up on code merge into master
  • (In progress) Configure Prettier and Eslint so new contributors have a better dev experience
  • Update README with the new sample UI
  • Create animation prop to customize speed and behaviour
  • Swipe to full screen mode like https://material.io/components/sheets-bottom/# (far in the roadmap)

Known issues

  • start panel with isActive set to true doesn't work. Alternative is to mount this component then set isActive to true.

Developer set up

  • npm i - in root directory
  • cd examples
  • npm i
  • npm start
  • in another tab: cd ios && pod install && cd ..
  • react-native run-ios or react-native run-android
Commit messages and release

This repo is sutomatically release by semantic-release. The type of bump (patch, minor, major) is determined by your commit message. For exmaple: fix: full screen display mode. This will be automatically released as a patch. You don't have to decide the bump. All you have to do is write your commit message according to this patter here: https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commits

Note: the first line of your commit message is displayed in the release notes. Make sure the message is aligned with the changes you are making.

Tip 1: make one PR for one problem. If you need to fix a bug, don't add a new feature at the same time. Create two PR's.

Tip 2: take a look at this repo to help write commit messages(optional): https://github.com/leonardoanalista/cz-customizable

This is a fork from: https://github.com/enesozturk/rn-swipeable-panel - all credits to original package creator https://github.com/enesozturk