@comparaonline/ui-offer-errors
TypeScript icon, indicating that this package has built-in type declarations

5.4.4 • Public • Published

@comparaonline/ui-offer-errors

A package for render view errors

Getting Started

To getting started with this package you will first install it, so

yarn add @comparaonline/ui-offer-errors

or

npm install @comparaonline/ui-offer-errors

Usage

Once you have installed the package, you can star using like

import React, { Component } from 'react';
import { Error404 } from '@comparaonline/ui-offer-errors';

interface ErrorViewProps extends RouteComponentProps<any> {}

class ErrorView extends Component<ErrorViewProps> {
  render() {
    return (
      <Error404
        buttonLabel={'Ir al inicio'}
        title={'Titulo'}
        subtitle={'Sub titulo'}
        description={'Mi descripción'}
        onClick={() => history.push('/form')}
      />
    );
  }
}

As you can see is so simple to use it

Props

the props that our component will use

Prop Name Description Default Value Expected Type Value Required
buttonProps an object containing the props needed for Button material ui {} ButtonProps false
buttonLabel the button title '' string false
title the title for the error view '' string false
subtitle the subtitle for the error view '' string false
description the description for the error view '' string false
descriptionComponent a component that will replace the entire description section undefined ReactElement false
onClick a function to be invoked when hit the button into the error view () => undefined Function false

Happy Coding 😎

Readme

Keywords

none

Package Sidebar

Install

npm i @comparaonline/ui-offer-errors

Weekly Downloads

3

Version

5.4.4

License

MIT

Unpacked Size

34.8 kB

Total Files

26

Last publish

Collaborators

  • gnavarro
  • dsuarez_compa
  • pfariaz
  • ricardo.sosa
  • suarezcumare
  • fverag
  • comparaonline-dev
  • comparaonlineprivate
  • matotias
  • javierlara1989
  • smurua
  • eseceve
  • pablocompara