UNPKG

@sanity/desk-tool

Version:

Tool for managing all sorts of content in a structured manner

29 lines (28 loc) 778 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.formatTimelineEventLabel = formatTimelineEventLabel; exports.getTimelineEventIconComponent = getTimelineEventIconComponent; exports.revTimelineProps = revTimelineProps; exports.sinceTimelineProps = sinceTimelineProps; var _constants = require("./constants"); function formatTimelineEventLabel(type) { return _constants.TIMELINE_LABELS[type]; } function getTimelineEventIconComponent(type) { return _constants.TIMELINE_ICON_COMPONENTS[type]; } function sinceTimelineProps(since, rev) { return { topSelection: rev, bottomSelection: since, disabledBeforeSelection: true }; } function revTimelineProps(rev) { return { topSelection: rev, bottomSelection: rev }; }