1.0.5 • Published 4 years ago

hu-alert-page v1.0.5

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
4 years ago

Habla Urbana Alert Page

  • App name: hu-alert-page.
  • Description: This is a React component which renders an Alert Page in order to handle warnings, errors or information notices if the application fails for any circumstance.

Refer to CHANGELOG.md NPM package history version.

Usage

Install

npm install --save hu-alert-page

Implementation

import AlertPage from 'hu-alert-page';
. . .
. . .

<AlertPage 
    alertType= 'warning'
    headerMsg= 'Algo salió mal'
    labelMsg= 'WHOOPS!!'
    message= 'Ve a nuestra página de "Inicio" para buscar más contenido.'
    buttons={[
        { 
            whereTo: '/', 
            btnType: 'primary', 
            labelBtn: 'Inicio' 
        }
    ]}
/>

PropTypes

// All properties are optional
AlertPage.propTypes = {
    alertType: PropTypes.oneOf(['warning', 'danger', 'primary']),
    labelMsg: PropTypes.string,
    headerMsg: PropTypes.string,
    buttons: PropTypes.array,
    message: PropTypes.string
};

// Default property alues
AlertPage.defaultProps = {
    alertType= 'warning'
    headerMsg= 'Algo salió mal'
    labelMsg= 'WHOOPS!!'
    message= 'Ve a nuestra página de "Inicio" para buscar más contenido.'
    buttons={[
        { 
            whereTo: '/', 
            btnType: 'primary', 
            labelBtn: 'Inicio' 
        }
    ]}
};
1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago