2.4.6 • Published 2 years ago

@heyjoule/sliding-up-panel v2.4.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

sliding-up-panel

React Native draggable sliding panel

Install

# With yarn
$ yarn add @heyjoule/sliding-up-panel

# With NPM
$ npm install --save @heyjoule/sliding-up-panel

Example

import React, { FunctionComponent } from 'react'
import { View, Button, Text } from 'react-native'

import SlidingUpPanel from '@heyjoule/sliding-up-panel'

const MyComponent = () => {
  const panelRef = useRef(null)

  return (
    <View>
      <Button title='Show panel' onPress={panelRef.show} />
      <SlidingUpPanel ref={panelRef}>
        <View>
          <Text>Here is the content inside panel</Text>
          <Button title='Hide' onPress={panelRef.hide} />
        </View>
      </SlidingUpPanel>
    </View>
  )
}

export default MyComponent