0.1.3 • Published 4 years ago

@freakycoder/react-native-empty-state v0.1.3

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

Empty State library which is fully customizable and simple for any state view use-cases

npm version npm Platform - Android and iOS License: MIT styled with prettier

Installation

Add the dependency:

npm i @freakycoder/react-native-empty-state

Peer Dependencies

"@freakycoder/react-native-bounceable": ">= 0.2.2",

Usage

Import

import EmptyState from "@freakycoder/react-native-empty-state";

Fundamental Usage

<EmptyState
  enableButton
  buttonText="Refresh"
  imageSource={emptyStateImage}
  title="Opps! Anything here :("
  description="We cannot find anything here, try again sometime"
/>

Example Project 😍

You can checkout the example project 🥰

Simply run

  • npm i
  • react-native run-ios/android

should work of the example project.

Configuration - Props

Fundamentals

PropertyTypeDefaultDescription
titlestringundefinedchange the title
descriptionstringundefinedchange the description

Customization (Optionals)

PropertyTypeDefaultDescription
enableButtonbooleanfalselet you enable the button (must use it for button)
onPressfunctionundefinedset your own logic for the button functionality when it is pressed
buttonTextstringundefinedchange the button's text
styleViewStyledefaultset or override the style object for the main container
buttonStyleViewStyledefaultset or override the style object for the button style
titleTextStyleTextStyledefaultset or override the style object for the title text style
buttonTextStyleTextStyledefaultset or override the style object for the button's text style
descriptionTextStyleTextStyledefaultset or override the style object for the description text style
containerGlueStyleViewStyledefaultset or override the style object for the container glue style
descriptionContainerStyleViewStyledefaultset or override the style object for the description container style
imageStyleImageStyledefaultset or override the style object for the image style
ImageComponentImagedefaultset your own component instead of default react-native Image component

Future Plans

  • LICENSE

Author

FreakyCoder, kurayogun@gmail.com

License

React Native Empty State is available under the MIT license. See the LICENSE file for more info.