EmptyView

Emptyview gives you a nice way to handle the empty state of your screen,like showing some api failure message or some illustration to illustrate user that there is not data on the screen.

emptyview
emptyview
emptyview

Usage

import { EmptyView } from 'frontatish';
<EmptyView
title="This is title"
subTitle="This is subtitle"
actionTitle="TRY AGAIN"
actionPress={() => {
/* function definition to be called on button click */
}}
type="primary"
/>;

Props

title

The heading that will be shown on top of your error screen,it will be a string which renders under Text View so you can pass custom styles titleStyle.

TypeDefaultRequired
string noneNo

titleStyle

custom Text Style object to style the title of your error message.

TypeDefaultRequired
TextStyle noneNo

subTitle

The subheading that will be shown below the title of the error screen,like title it is also a string which renders under Text View,whose styles you can control with subTitleStyle

TypeDefaultRequired
string noneNo

subTitleStyle

custom Text Style object to style the subtitle of your error message.

TypeDefaultRequired
TextStyle noneNo

actionTitle

action will let you to place a button in error screen so that user can perform any action,if some error occured or there is no data. so actionTitle will be the label of Button.

TypeDefaultRequired
string noneNo

actionType

using this props you can control the type of button to be used in the action part of the empty view,the values will be the same as type props of Button Component

actionPress

it is a function to be called when user will press the button,it is similar as onPress props of Button Component