Releox react
Table of Content
- AsyncSelectFormik
- Button
- Card
- CheckBox
- CoreuiCheckBox
- Coreui Layout
- DataTable
- Input
- LoginScene
- NativeInput
- TextArea
- Create generic index
- Create generic form
- Details
- DetailField
- ReactSelect
- Select
AsyncSelectFormik
AsyncSelectFormik props
label
- string, Required - Label for AsyncSelectFormikname
- string, Required - Name for AsyncSelectFormikgetUrl
- string, Required - URL for data in AsyncSelectFormikqueryFormat
- string, Required - Queryformat for data in AsyncSelectFormik ('mongodb' | 'postgresql')id
- string, - Default'undefined'
- Custom id for AsyncSelectFormikinline
- boolean, Default:false
- Inline label format for AsyncSelectFormikinlineLabelWidth
- number, Default:4
- Label width for AsyncSelectFormik (MAX = 12)labelClass
- string, Default:''
- Custom class for label
Button
Button props
id
: - string, Required - Id for buttonchildren
- string | JSX.Element Required - Children for buttontype
: - string - Default'undefined'
- Type of button ('submit' | 'button');onClick
- () => any - Default'undefined'
- Callback to button's onClick eventclassName
- string - Default'undefined'
- Custom class for buttoncolor
- ButtonColor - Default'undefined'
- Custom color for button ('primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark' | 'link')
Card
Card props
children
- JSX.Element, Required - Card's main contentheader
- JSX.Element, Default:undefined
- Header element of cardid
- string, Default:''
- Card's idclassName
- string, Default:''
- Custom class for card headersetCardBody
- boolean, Default:true'
- Add card-body class to card body
CheckBox
CheckBox props
label
- string, Required - Label for checkBoxname
- string, Required - Name for checkBoxid
- string, - Default${name}-input
- Custom id for checkBoxlabelClass
- string, Default:'form-check-label'
- Custom class for labelinputClass
- string, Default:'form-check-input'
- Custom class for inputonChange
- (event: React.ChangeEvent) => void, Default:undefined
- onChange function to checkBox
CoreuiCheckBox
CoreuiCheckBox props
label
- string, Required - Label for coreuicheckBoxname
- string, Required - Name for coreuicheckBoxid
- string, - Default${name}-input
- Custom id for coreuicheckBox
Coreui Layout
CoreuiLayout props
children
- JSX.Element | string, Required - Layout's main contentbrand
- string | JSX.Element, Required - Header brand text or elementsidebarMenu
- CoreuiSidebarMenu[], Required - Sidebar menubrandUrl
- string, Default:'/'
- Header brand text or elementheaderRightText
- string, Default:''
- Text in right side of CoreuiHeader
DataTable
DataTable props
totalSize
- Number, Required - Data total sizedata
- any[], Required - Data to showcolumns
- DataTableColumn[], Required - Columns to showdefaultSorted
- DataTableDefaultSort, Required - Remote sort when component renderkeyField
- string, Default:'id'
- key field for mapped datahover
- Boolean, Default:true
- Add hover effect to tablestriped
- Boolean, Default:true
- Add stripes to tablenoDataText
- string, Default:'There is nothing to show'
- Text which is visible when data is empty array.overlayElement
- () => JSX.Element, Default: OverlayLoading - Element which is visible when loading prop is trueloading
- Boolean, Default:false
- Show loading indicatorbordered
- Boolean, Default:false
- Add borders to tableonClick
- (event: string, row: RowObject) => void, Default:undefined
- event is called when user click the table rowrowClasses
- string, Default:undefined
- classes that are added to table's rowonChangeLoopback
- (config: DataTableLoopbackFilter) => void, Default:undefined
- Loopback specific Table on change event. It use loopback query format by defaultquery
- any, Default:undefined
- Query is added to every onTableChange events
Input
Input props
label
- string, Required - Label for inputname
- string, Required - Name for inputid
- string, - Default${name}-input
- Custom id for inputinline
- boolean, Default:false
- Inline label format for inputinlineLabelWidth
- number, Default:4
- Label width for input (MAX = 12)labelClass
- string, Default:''
- Custom class for labeltype
- InputTypes, Default:'text'
- Type of input data ('text' | 'email' | 'password' | 'date' | 'number')placeholder
- string, Default:label
- Placeholder for inputclassname
- string, Default:form-control'
- Custom class for input
LoginScene
LoginScene props
onSubmit
- (body: LoginBody) => Promise; - Default behavior - Logs user in through API, saves user and token and sets redirect state to the wanted pageonError
- (err: Error) => void; - Default behavior - Sets error message to the statelocale
- ReleoxLocale; Defaultfi
- Sets translations of the pagetitleBlock
- string | JSX.Element; Defaultundefined
- Sets custom title to the screenloginFieldName
- string; Default'email'
- Change login login to email based login or username based loginshowForgotPasswordLink
- Boolean; Defaulttrue
- Hide forgot password link from page
Create generic index
createGenericIndexoptions;
options
- GenericIndexOptions, required - Index scene options
Create generic form
createGenericFormSceneoptions;
options
- GenericFormSceneProps, required - Form scene options
NativeInput
NativeInput props
label
- string, Required - Label for inputname
- string, Required - Name for inputid
- string, - Default${name}-input
- Custom id for inputinline
- boolean, Default:false
- Inline label format for inputinlineLabelWidth
- number, Default:4
- Label width for input (MAX = 12)labelClass
- string, Default:''
- Custom class for labeltype
- InputTypes, Default:'text'
- Type of input data ('text' | 'email' | 'password' | 'date' | 'number')placeholder
- string, Default:label
- Placeholder for inputclassname
- string, Default:form-control'
- Custom class for input
NativeTextArea
NativeTextArea props
label
- string, Required - Label for textAreaname
- string, Required - Name for textAreaid
- string, - Default${name}-input
- Custom id for textAreainline
- boolean, Default:false
- Inline label format for textAreainlineLabelWidth
- number, Default:4
- Label width for textArea (MAX = 12)labelClass
- string, Default:''
- Custom class for labelrows
- number, Default:6
- Length of rows in textAreaplaceholder
- string, Default:label
- Placeholder for textAreaclassname
- string, Default:form-control'
- Custom class for textArea
TextArea
TextArea props
label
- string, Required - Label for textAreaname
- string, Required - Name for textAreaid
- string, - Default${name}-input
- Custom id for textAreainline
- boolean, Default:false
- Inline label format for textAreainlineLabelWidth
- number, Default:4
- Label width for textArea (MAX = 12)labelClass
- string, Default:''
- Custom class for labelrows
- number, Default:6
- Length of rows in textAreaplaceholder
- string, Default:label
- Placeholder for textAreaclassname
- string, Default:form-control'
- Custom class for textArea
Details
Details props
object
- object, Required - Data objectproperties
- DetailsFieldData, Required - Properties show data from object, it should have label and key
DetailField
DetailField props
label
- string, Required - Label for fieldchildren
- string, Required - Value to show
ReactSelect
ReactSelect props
label
- string, Required - Label for reactSelectname
- string, Required - Name for reactSelectoptions
- [{value: string, label: string}] Required - Select options for reactSelect componentid
- string, - Default${name}-input
- Custom id for reactSelectinline
- boolean, Default:false
- Inline label format for reactSelectinlineLabelWidth
- number, Default:4
- Label width for reactSelect (MAX = 12)labelClass
- string, Default:''
- Custom class for labelplaceholder
- string, Default:label
- Placeholder for reactSelectclassname
- string, Default:form-control'
- Custom class for reactSelect
Select
Select props
label
- string, Required - Label for selectname
- string, Required - Name for selectoptions
- [{value: string | number, label: string | number}] Required - Select options for select componentid
- string, - Default${name}-input
- Custom id for selectinline
- boolean, Default:false
- Inline label format for selectinlineLabelWidth
- number, Default:4
- Label width for select (MAX = 12)labelClass
- string, Default:''
- Custom class for labelplaceholder
- string, Default:label
- Placeholder for selectclassname
- string, Default:form-control'
- Custom class for select