Elements
Most layout components will hand over the element rendering to the user. This is done via the renderElement
prop on columns
, data
, timeframes
, markers
.
The type for all the renderElement
props defines the render function
This means a inline function or a React Component function can be used
The elementPosition
object contains the position and size of the parent div
.
Special Render Elements
There are two special props for render elements
expandCollapseElement
dateTimeframeRenderElements
Both of these will provide additional things in the callback and expect a normal renderElement
callback as a return value.
expandCollapseElement
Provides expand: boolean
and onClick: () => void
to render an expand/collapse button and handle the onClick
event.
dateTimeframeRenderElements
Requires an object for specifying Month and Day element renderElement
functions for the timeline header section. Provides date info in the callbacks.
Element
If no html elements are required, a simple React.Fragment
can be returned to wrap values