0.1.10 • Published 3 years ago

@falorun/personal-react-toolkit v0.1.10

Weekly downloads
37
License
ISC
Repository
github
Last release
3 years ago

Documentation

Welcome to My React Component ToolKit !

See documentation below for more informations.

tips: This lib is under development.

Installation

$ npm i @falorun/personal-react-toolkit

You can now import in your component file :

import { Button } from "@falorun/personal-react-toolkit";

const MyComponent: React.FC<YourPropsTypes> = (props) => {
  return <Button> {props.foo} </Button>;
};

export default MyComponent;

Doc By Component

Buttons

Props with ? is are optional

PropsExpectedDefaultComments
variant"rounded", "square", "slight-rounded", "empty", "icon";"square"Set the type of button you want
bold?BooleanFalseIf you want the button text to be bold (customizable with className)
color?"red", "blue", "green", "orange", "purple", "black", "white""white"Text color of the button
bgColor?same as above"blue"The background color of the button
size?"small", "standard", "big""standard""The size of the button (cust. with className)"
icon?the name of icon (see material design icons)"MdClose"The button can have an icon
----

Box

PropsExpectedDefaultComments
centeredbooleantrueChildrens will be centrered
columnbooleantrueChildrens will be column
maxWidth?string ex: "200px"300pxBox max width
----

Card

PropsExpectedDefaultComments
direction"column", "row""column"Flex direction of the card
clickable?booleanfalseThe card will have an animation that show it is clickable
----

Container

PropsExpectedDefaultComments
fluid?booleantrueThe container will take the whole width
----

Form

WIP

PropsExpectedDefaultComments

Icon

PropsExpectedDefaultComments
namestring (see Material Design icons)MdCloseA simple svg icon
----

Input

PropsExpectedDefaultComments
variant"filled", "standard", "square""square"Define the input's variant
labelTitle?string-input's label
error?string-The error will be shown below the input
isError?booleanfalseIf error, input will be shown this errors
inputSize?"big", "standard", "small""standard"Size of the input
valuestring-Value of the input
----

Menu

PropsExpectedDefaultComments
isShowboolean-Show the menu
----

Popup

PropsExpectedDefaultComments
isError?boolean-Popup Style
iconName?string (see material design icons)--
isShowboolean-Show the popup or not
handleClosefunc-Function on Close
----

Title

PropsExpectedDefaultComments
variant"small", "standard", "big""standard"Title variant
----

Tooltip

PropsExpectedDefaultComments
titlestring-The title of the tooltip
position?"top", "bottom""top"-

Warnings

  • This toolkit is under development, you can encounter some mistakes.
  • All Components still under dev too.