Dashbard
Dashboard component for applications
Props
Props | Default value | Type |
---|---|---|
dashboardTitle | Dashboard | String |
items | [] | Object |
mode | design | Enum ['render','design','project'] |
1. dashboardTitle
- Title for the dashboard
- Default Value: Dashboard
<Dashboard dashboardTitle="Databoard"/>
2. items
- Object for representing dashboard layout
- Default Value: []
var items = [
{i: 'widget0', x: 0, y: 0, w: 3, h: 2},
{i: 'widget1', x: 3, y: 0, w: 3, h: 2},
{i: 'widget2', x: 6, y: 0, w: 3, h: 2}
];
<Dashboard items={items}/>
- i - unique key for each item
- x - x position (x=0 means column 1)
- y - y position (y will be infinity to get auto height)
- w - width value (w=3 means 3 column width)
- h - height value (h=2 means 2 row height)
3. mode
Represents dashboard behaviour. Accept three values - design,render,project. Default Value: 'design'
- design - widgets can be added and layout can be modified
- render mode - layout can be modified
- project - read only mode
<Dashboard dashboardTitle="Databoard" mode="project" items={items}/>