UNPKG

@limetech/lime-elements

Version:
19 lines (18 loc) 586 B
import React from "react"; /** * * @param schema * @param extraProps - additional props to pass to the limel-help element */ export function getHelpComponent(schema, extraProps) { var _a; const help = (_a = schema.lime) === null || _a === void 0 ? void 0 : _a.help; if (!help) { return; } if (typeof help === 'string') { return React.createElement('limel-help', Object.assign({ value: help }, extraProps)); } const helpProps = help; return React.createElement('limel-help', Object.assign(Object.assign({}, helpProps), extraProps)); }