1.0.1 • Published 3 years ago

@wniemiec-component-reactnative/modal v1.0.1

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

npm.io

❇ Introduction

React Native component that that is displayed on top of the screen. Modals put an overlay on the screen; therefore, they take visual precedence over all the other elements.

🖼 Gallery

❓ How to use

  1. Install the component
$ npm install --save @wniemiec-component-reactnative/modal
  1. Import the component
import Modal from '@wniemiec-component-reactnative/modal';
  1. Use it
[...]

import React, { useState } from 'react';
import { View } from 'react-native';

[...]

const [visible, setVisible] = useState(true);

[...]

<View style={{ display: 'flex', flex: 1, justifyContent: 'center', alignItems: 'center' }}>
  <Modal visible={visible} setVisible={setVisible} title='Some title...'>
	<Text>Some text...</Text>
  </Modal>
</View>

[...]

📖 Documentation

PropertyTypeDescriptionDefault
visibleobjectIndicates whether the modal should be displayed-
setVisiblefunction(void): voidFunction that is called when the close button is pressed indicating that the modal should no longer be visible-
stylestringCustom stylenull
titlestringModal title""

🚩 Changelog

Details about each version are documented in the releases section.

🤝 Contribute!

See the documentation on how you can contribute to the project here.

📁 Files

/

NameTypeDescription
docsDirectoryDocumentation files
srcDirectorySource files