Skip to main content

Components

More useful components are available in The majority of the app will be developed in the src/components/ directory.

Ag Grid Table

<AgGridTable
urlParam={url}
fieldNames={['name', 'email', 'phone', 'active']}
section="user"
toggleButton={{ show: true, field: 'active' }}/>
propdescriptionrequireddefault
urlParamUrl to fetch api calls for the table datatrueNone
fieldNamesField names to be fetched from the data from API calltrueNone
sectionUsed for navigation purposes after actions like edit, add and deletetrueNone
viewPopUpSwitches between view page and view popupfalsefalse
toggleButtonObject that specifies whether to show a toggle button or notfalse{ show: false, field: 'none' }
addButtonPlaceholderPlaceHolder for add buttonfalsenull

Counter Cards

<Counter
className={styles[card1bgStyle]}
cardstyle={styles.cardbox1}
cardicon={faBookOpenReader}
text="Users"
count={NumFormatter(usercount)}
url="/user"
/>

propdescriptionrequireddefault
textThe text to be displayedtrueNone
countCount to be showntrueNone
cardstyleStyle to be passedtrueNone
cardiconIcon to be used in cardtrueNone
classNameClassName to be used for the componenttrueNone
urlUrl to be navigatedfalsenull

Custom Table

Reusable custom table component data={data} table data is passing here .section="user"if toggle button is needed we can pass toggle button like this toggleButton={{ show: true, field: 'active' }}`


<CustomTable
data={data}
viewPopUp
section="User"
toggleButton={{ show: true, field: 'active' }}
/>

propdescriptionrequireddefault
textThe text to be displayedtrueNone
countCount to be showntrueNone
cardstyleStyle to be passedtrueNone
cardiconIcon to be used in cardtrueNone
classNameClassName to be used for the componenttrueNone
urlUrl to be navigatedfalsenull

Doughnut Chart

 <DoughnutChart
title="Doughnut Chart"
labels={months}
datas={graph}
label="# of Votes"
backgroundColor={[
'#ff9f40',
'#36a2eb',
'#4bc0c0',
'#ffcd56',
'#ff6384',
'"##d11919',
]}
borderColor={['#ffff', '#ffff', '#ffff', '#ffff', '#ffff', '#ffff']}
borderWidth="1"
/>

propdescriptionrequireddefault
labelsfunction to be executed when value changestrueNone
datasData required for the charttrueNone
backgroundColorArray of colors required for the charttrueNone
borderColorBorder Color for the charttrueNone
borderWidthBorder width for the charttrueNone
titleTitle for the charttrueNone
heightRequired height for the chartfalse500
widthRequired width for the chartfalse500

AutoComplete

<AutoComplete url={url} field="email" />

Autocomplete component api url is passed as url variable and field name as field.

DateRange


<DateRangeFilter onChange={onChange} open={open} setOpen={setOpen} />
propdescriptionrequireddefault
onChangefunction to be executed when value changestrueNone
openindicates whether the daterange picker is open or notfalsefalse
setOpenFUnction to handle the value of OpentrueNone