import { ArgsTable } from '@storybook/addon-docs/blocks';
import PageWrapper from "../index";

# Page Wrapper

Page wrapper can be used as a universal container of a page.
It helps to implement corporate predefined style guidelines and avoid hardcoding logic for loading and error states.

## Props

Pass `isFetching` property to display Spinner when the page is loading.
Pass `fetchError` property to display ErrorHandler component when there is an error on the page.
To specify the route back to previous page in case of error pass it to `backRoute` property.
Add custom styling using `style` and `spinnerStyle` for content and spinner components accordingly.

<ArgsTable of={PageWrapper} />
