1.0.3 • Published 4 years ago
qmodal v1.0.3
React Native Custom Modal
This is a modal creator, Currently UNSTABLE and in construction do not consume.
Examples
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
Prop | Type | Default |
---|---|---|
card | bool | false |
backdrop | bool | false |
toggle | Callback | - |
half | bool | true |
full | bool | false |
top | bool | false |
center | bool | false |
animation | string | slide |
Author
- Brett McCausland - McCauslandBrett