1.4.0 • Published 5 years ago

nrd.js v1.4.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

NRD.js

A React Component Library with all the most used components for Front-End Development created by lnardon

NPM JavaScript Style Guide

You can use this React Component Library to optimize your front-end development or even give it a more complete feel to your functional mockups.

For now all the components have a minimalistic black/white style but in the future new designs will be created

Available Components:

Available Hooks:

Install

npm install nrd.js

Usage

import React from 'react'

import { LoginForm } from 'nrd.js'

const App = () => {
  return <LoginForm />
}

License

Any Contribution is Welcome !!! MIT © lnardon

DOCUMENTATION

Components

Alert

PropDescriptionvalue/format
messageAlert's Messagestring

ContactForm

PropDescriptionvalue/format
urlURL of the server to make the POST request with the username and passwordstring
titleTitle to be displayed above the formstring

ExpandableArea

PropDescriptionvalue/format
titleTitle of the expandalble areastring
contentContent hidden by the expandalble areastring
getStatusCallback to get the status expandalble areafunction

InputField

PropDescriptionvalue/format
typeType of the input field (e.g: string, number, email, password)string
getvalueCallbackCallback that returns the value from the input field as parameterfunction

LoginForm

PropDescriptionvalue/format
LoginImageURL of the image displayed above the formstring
urlURL of the server to make the POST request with the username and passwordstring

Progress

PropDescriptionvalue/format
maxValueMaximun value of the progress indicatornumber
progressValueInitial value of the progress indicatornumber

Rating

PropDescriptionvalue/format
getvalueCallbackCallback that returns the value from the Rating Component as parameterfunction

Select

PropDescriptionvalue/format
optionsArray with the options available for the user to select(e.g: {label: OptionTitle, value: InputValue})array of JSON
getvalueCallbackCallback that returns the selected value from the select as a parameterfunction

Slider

PropDescriptionvalue/format
minMinimal value of the slidernumber
maxMaximal value of the slidernumber
getvalueCallbackCallback that returns the value from the Select Component as parameterfunction

Switch

PropDescriptionvalue/format
getStateCallback that returns the state of the switchfunction

Hooks

useCPFChecker

Function to check if the CPF Number (Brazilian Social Security) is valid.

useLocalStorage

Function to facilitate saving values in local storage.

useLogger

Function to log a given variable every time it change value.