@react-typed-forms/schemas 11.4.0 → 11.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/createDefaultRenderers.d.ts +1 -0
- package/lib/index.js +5 -2
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -22,6 +22,7 @@ interface StyleProps {
|
|
|
22
22
|
}
|
|
23
23
|
interface DefaultActionRendererOptions {
|
|
24
24
|
className?: string;
|
|
25
|
+
renderContent?: (actionText: string, actionId: string, actionData: any) => ReactNode;
|
|
25
26
|
}
|
|
26
27
|
export declare function createButtonActionRenderer(actionId: string | string[] | undefined, options?: DefaultActionRendererOptions): ActionRendererRegistration;
|
|
27
28
|
interface DefaultGroupRendererOptions {
|
package/lib/index.js
CHANGED
|
@@ -2352,15 +2352,18 @@ function createButtonActionRenderer(actionId, options) {
|
|
|
2352
2352
|
options = {};
|
|
2353
2353
|
}
|
|
2354
2354
|
return createActionRenderer(actionId, function (_ref) {
|
|
2355
|
+
var _options$renderConten;
|
|
2355
2356
|
var onClick = _ref.onClick,
|
|
2356
2357
|
actionText = _ref.actionText,
|
|
2357
2358
|
className = _ref.className,
|
|
2358
|
-
style = _ref.style
|
|
2359
|
+
style = _ref.style,
|
|
2360
|
+
actionId = _ref.actionId,
|
|
2361
|
+
actionData = _ref.actionData;
|
|
2359
2362
|
return /*#__PURE__*/React__default["default"].createElement("button", {
|
|
2360
2363
|
className: rendererClass(className, options.className),
|
|
2361
2364
|
style: style,
|
|
2362
2365
|
onClick: onClick
|
|
2363
|
-
}, actionText);
|
|
2366
|
+
}, (_options$renderConten = options.renderContent == null ? void 0 : options.renderContent(actionText, actionId, actionData)) != null ? _options$renderConten : actionText);
|
|
2364
2367
|
});
|
|
2365
2368
|
}
|
|
2366
2369
|
function createDefaultGroupRenderer(options) {
|