1.0.5 • Published 6 years ago
ent-alert-page v1.0.5
Enterprise Alert Page
App name: ent-alert-page.
Download/Workspace setup:
- Clone this GitLab repository on your local.
- Lauch Git Bash on your root folder and hit
cd ent-alert-page. - Run command line
npm installin order to get node modules installed on your local.
Available Scripts
In the project directory, you can run:
npm run start
Runs the app in the development mode. Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits. You will also see any lint errors in the console.
npm run build
Builds the app for development to the build folder using webpack.
It correctly bundles React in development mode.
This bundled app is not to be deployed, IS ONLY FOR LOCAL DEVELOPMENT and /build folder should not be commited.
npm run dev
Runs the app for local validation using nodemon configuration.
DOES NOT CREATES BOUNDLE VERSION APP.
Usability
Install
npm install --save ent-alert-pageImplementation
import AlertPage from 'ent-alert-page';
. . .
. . .
<AlertPage
alertType='primary'
headerMsg='Información'
message='Info'
labelMsg='Aviso informativo'
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: 'primary',
headerMsg: 'Información',
labelMsg: 'Info',
message: 'Aviso informativo',
buttons: []
};