Skip to main content

HistoryEntryComponent

HistoryEntryComponent

This interface should be implemented by components intended to display a history entry in the Order or Customer history timeline. If the component needs access to the Order or Customer object itself, you should implement OrderHistoryEntryComponent or CustomerHistoryEntryComponent respectively.

Signature
interface HistoryEntryComponent {
entry: TimelineHistoryEntry;
getDisplayType: (entry: TimelineHistoryEntry) => TimelineDisplayType;
isFeatured: (entry: TimelineHistoryEntry) => boolean;
getName?: (entry: TimelineHistoryEntry) => string | undefined;
getIconShape?: (entry: TimelineHistoryEntry) => string | string[] | undefined;
}

entry

property
TimelineHistoryEntry

The HistoryEntry data.

getDisplayType

property
(entry: TimelineHistoryEntry) => TimelineDisplayType

Defines whether this entry is highlighted with a "success", "error" etc. color.

isFeatured

property
(entry: TimelineHistoryEntry) => boolean

Featured entries are always expanded. Non-featured entries start of collapsed and can be clicked to expand.

getName

property
(entry: TimelineHistoryEntry) => string | undefined

Returns the name of the person who did this action. For example, it could be the Customer's name or "Administrator".

getIconShape

property
(entry: TimelineHistoryEntry) => string | string[] | undefined

Optional Clarity icon shape to display with the entry. Examples: 'note', ['success-standard', 'is-solid']