0.0.15 • Published 5 years ago

react-native-draggable-backdrop v0.0.15

Weekly downloads
6
License
MIT
Repository
github
Last release
5 years ago

installation :

npm install react-native-draggable-backdrop --save

import :

import DraggableBackdrop from 'react-native-draggable-backdrop';

usage :

import React, {Component} from 'react';
import {Platform, StyleSheet, View, Dimensions, Text} from 'react-native';
import DraggableBackdrop from 'react-native-draggable-backdrop';

const instructions = Platform.select({
  ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
  android:
    'Double tap R on your keyboard to reload,\n' +
    'Shake or press menu button for dev menu',
});

type Props = {};
export default class App extends Component<Props> {
    constructor(props) {
        super(props);

    }
    render() {
        return (
            <View style={styles.container} >
                <Text>
                    {instructions}
                </Text>
		  <DraggableBackdrop
           	    showBackground
           	    ref={ref=>this.backdrop = ref}
           	    backgroundColor='white'
          	    handleBackPress
       		  >
         	    <Text> hello </Text>
      	         </DraggableBackdrop>
            </View>
        );
    }

}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
  welcome: {
    fontSize: 20,
    textAlign: 'center',
    margin: 10,
  },
  instructions: {
    textAlign: 'center',
    color: '#333333',
    marginBottom: 5,
  },
});

props :

 marginHorizontal: numeric
 backgroundColor: string
 radius: numeric
 elevation: numeric
 onExpand: function
 indicatorColor: string
 showBackground: boolean // shows background
 handleBackPress: boolean // collapse on backpress

functions:

 expand()
 collapse()
0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago