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

docking-bottom-sheet

v1.0.6

Published

DockingBottomSheet offers a React Native component that takes in 2 types of content views as props. One is Main content view and the other is Bottom-Sheet content view. Initially Main view is the active view when Bottom-Sheet is docked at the bottom. It c

Downloads

3

Readme

docking-bottom-sheet NPM version Build Status

Demo link: https://github.com/iamrajatsoni/DockingBottomSheet/tree/master/demo

DockingBottomSheet offers a React Native component that takes in 2 types of content views as props. One is Main content view and the other is Bottom-Sheet content view. Initially Main view is the active view when Bottom-Sheet is docked at the bottom. It can also be expanded and docked at the top by dragging or using function expandBottomSheet(). Once expanded, dockBottomSheet() function can be used to programmatically dock the rendered bottom-sheet. Various other props are exposed that can be used to customise DockingBottomSheet depending on one's requirement.

Installation

$ npm i docking-bottom-sheet

Import and Basic Usage

Import

import DockingBottomSheet from 'docking-bottom-sheet'
var DockingBottomSheet = require('docking-bottom-sheet');

Basic Usage

<DockingBottomSheet
    ref={ (bottomSheetRef)=> this.bottomSheetRef = bottomSheetRef }
    containerStyle={ <style object> }
    dockHeight={ <number> }
    sheetExpandedTopOffset={ <number> }
    sheetDarknessAlpha={ <float (0 to 1)> }
    mainViewDownScale={ <float (0 to 1)> }
    mainContentView={ <function that returns UI elements> }
    bottomSheetContentView={ <function that returns UI elements> }
/>

Props

  • containerStyle [Object]: Styling for View that holds main-view and bottom-sheet views. default: { flex: 1 }

  • dockHeight [Number]: Visible height of bottom-sheet when it is docked at the bottom. default: 96

  • sheetExpandedTopOffset [Number]: Top-offset of bottom-sheet in its expanded state. default: 128

  • sheetDarknessAlpha [Float]: The final background darkness alpha of bottom-sheet when its completely expanded. default: 0.7

  • mainViewDownScale [Float]: The final scale-down value of View [main-view] behind bottom-sheet scales down when its completely expanded. default: 0.9

  • mainContentView [Function]: Function that returns View[main-view] to be rendered behind bottom-sheet. default: () => null

  • bottomSheetContentView [Function]: Function that returns View to be rendered as bottom-sheet [Note: the bottom-sheet itself is a scroll-view so do not pass scroll-view as parent view-element to this prop]. default: () => null

Functions

  • expandBottomSheet(): Used to programmatically expand bottom-sheet. eg. bottomSheetRef.expandBottomSheet()

  • dockBottomSheet(): Used to programmatically dock bottom-sheet at the bottom. eg. bottomSheetRef.dockBottomSheet()

Note

  • Bottom-Sheet's parent is a React Native ScrollView, hence avoid passing ScrollView as root component to prop bottomSheetContentView.

License

MIT © Rajat Soni