UNPKG

datocms-plugin-sdk

Version:
15 lines 679 B
import { isArray, isNullish, isNumber, isPlacement, isRecord, isString, } from '../guardUtils.js'; import { isIconWithEmoji } from '../icon'; export function isContentAreaSidebarItem(value) { return (isRecord(value) && isString(value.label) && isIconWithEmoji(value.icon) && isRecord(value.pointsTo) && isString(value.pointsTo.pageId) && (isNullish(value.placement) || isPlacement(value.placement)) && (isNullish(value.rank) || isNumber(value.rank))); } export function isReturnTypeOfContentAreaSidebarItemsHook(value) { return isArray(value, isContentAreaSidebarItem); } //# sourceMappingURL=contentAreaSidebarItems.js.map