1.0.3 • Published 4 years ago

qmodal v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

React Native Custom Modal

This is a modal creator, Currently UNSTABLE and in construction do not consume.

Examples

Artboard

Usage

import React from 'react';
import { Text } from 'react-native';
import {Block} from 'galio-framework';
import CModal from "../components/CModal/CModal.js"


export default class App extends React.Component {
  state={
    visible:false
  };
  toggleOverlay = () =>{
    this.setState({
      visible:!this.state.visible
    });
  }

  render() {
    return (
      <Block safe flex>
        <CModal
          animation={'fade'}
          card full center backdrop
          visible={this.state.visible}
          toggle={this.toggleOverlay}
         >
          <Text>Hello</Text>
        </CModal>
    );
  }
}

Dependencies

  npm i -S react-native-swipe-gestures

Props

PropTypeDefault
cardboolfalse
backdropboolfalse
toggleCallback-
halfbooltrue
fullboolfalse
topboolfalse
centerboolfalse
animationstringslide

Author

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago