0.1.1 • Published 3 years ago

react-e-nno-component v0.1.1

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

Get started

npm Start

Runs the app in the development mode. Open http://localhost:3000 to view the components in the browsers

The page will reload if you make edits.

Components

Buttons

Available props :

nametypesDetail
textStringWill be the text in the button
classNameStringbutton-greybutton-bluebutton-ghostbutton-disabled
sizeStringMLS
onClickFunctionPass the onClick function you want on the button
iconJSX iconAdd an icon to the button, ex:""

Icons

Available props :

nametypesDetail
typeStringWill be the text in the button
sizeStringsmall-iconmedium-iconlarge-icon

Available of type: ChevronLeft ChevronRight ChevronDown ChevronUp Plus Minus User AtSign Lock X ArrowUpCircle Search Lock AlertCircle CheckCircle ArrowLeft ArrowRight Thermometer

Inputs

Available props :

nametypesDetail
elementStringInputSelectTextArea
idString
typeStringHtml input types
labelStringLabel on top of the input
validatorsFunctionFunction to validate the inputs. If not needed, pass an empty array
errorTextStringHelper text below the input
onInputFunctionFunction that handles the input
disabledBooleanLet to enable of disable the input. If true, add "disabled" className.
classNameStringCan set a specific className to overpass the default.
dataArrayLet you pass an array for select html inputs
minNumberWork together with number type
maxNumberWork together with number type
logoIcon componentLet you pass a logo on the right of the input

NB : validators && onInput works together with the form-hook && validators

Toggle

Available props :

nametypesDetail
nameStringInput name
sizeStringsmallbig
onChangeFunctionGive a function to your toggle
labelRightStringLabel on the right of the toggle
labelLeftStringLabel on the left of the toggle
checkedInputBooleanDisable the toggle

Radio

Available props :

nametypesDetail
onChangeFunctionGive a function to your radio
valueString
labelStringLabel on the right of your radio

Checkbox

Available props :

nametypesDetail
onChangeFunctionGive a function to your checkbox
nameStringGive a function to your checkbox
checkedBooleanDefault checked
labelStringLabel on the right of your checkbox

FilePicker

Available props :

nametypesDetail
onInputFunctionHandle downloaded file

NB: work together with form-hook

Login

Available props :

nametypesDetail
successLoginFunctionGive a function on sucessfull login
retrievePasswordFunction

NavBar

Available props :

Avatar

Available props :

nametypesDetail
sizeStringsmall-avatarmedium-avatarlarge-avatar
imageBooleanIf true, pass the source. If false, passe the initials
sourceStringlink to an image
descriptionStringLet you pass a description to the picture
initialeStringDisplay initials instead of picture ("S.B.")

Tags

Available props :

nametypesDetail
textStringPass string to be displayed in the tag
typeStringIf true, pass the source. If false, passe the initials

Small cards

Available props :

nametypesDetail
iconIconImported from icon Component
titleStringLet you se a title to the card
subTitleStringLet you se a sub-title to the card
temperatureNumberLabel on the right of the toggle
menuBooleanAdd or not an icon to the right of the card
onClickFunctionIf Menu is set to true, possibility to add function to the icon
simpleCardBooleanif True, create a simple card with only Title and sub-title

Created with ❤️ by Simon Busch for E-nno Switzerland S.A.