@plasmicapp/react-web 0.2.205 → 0.2.206
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/dist/all.d.ts +1 -0
- package/dist/index.cjs.js +6 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/plume/button/index.d.ts +1 -0
- package/dist/react-web.esm.js +6 -3
- package/dist/react-web.esm.js.map +1 -1
- package/package.json +3 -3
- package/skinny/dist/plume/button/index.d.ts +1 -0
- package/skinny/dist/plume/button/index.js +6 -3
- package/skinny/dist/plume/button/index.js.map +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { AnyPlasmicClass, PlasmicClassArgs, PlasmicClassOverrides, PlasmicClassVariants, VariantDef } from "../plume-utils";
|
|
3
3
|
interface CommonProps {
|
|
4
|
+
htmlType?: "submit" | "button";
|
|
4
5
|
showStartIcon?: boolean;
|
|
5
6
|
showEndIcon?: boolean;
|
|
6
7
|
startIcon?: React.ReactNode;
|
package/dist/react-web.esm.js
CHANGED
|
@@ -2589,13 +2589,16 @@ function getPlumeType(child) {
|
|
|
2589
2589
|
function useButton(plasmicClass, props, config, ref) {
|
|
2590
2590
|
var _a, _b, _c, _d;
|
|
2591
2591
|
if (ref === void 0) { ref = null; }
|
|
2592
|
-
var link = props.link, isDisabled = props.isDisabled, startIcon = props.startIcon, endIcon = props.endIcon, showStartIcon = props.showStartIcon, showEndIcon = props.showEndIcon, children = props.children, rest = __rest(props, ["link", "isDisabled", "startIcon", "endIcon", "showStartIcon", "showEndIcon", "children"]);
|
|
2592
|
+
var link = props.link, isDisabled = props.isDisabled, startIcon = props.startIcon, endIcon = props.endIcon, showStartIcon = props.showStartIcon, showEndIcon = props.showEndIcon, children = props.children, htmlType = props.htmlType, rest = __rest(props, ["link", "isDisabled", "startIcon", "endIcon", "showStartIcon", "showEndIcon", "children", "htmlType"]);
|
|
2593
2593
|
var variants = __assign(__assign({}, pick.apply(void 0, __spreadArray([props], __read(plasmicClass.internalVariantProps), false))), mergeVariantToggles({ def: config.showStartIconVariant, active: showStartIcon }, { def: config.showEndIconVariant, active: showEndIcon }, { def: config.isDisabledVariant, active: isDisabled }));
|
|
2594
2594
|
var args = __assign(__assign(__assign(__assign({}, pick.apply(void 0, __spreadArray([props], __read(plasmicClass.internalArgProps), false))), (config.startIconSlot && (_a = {}, _a[config.startIconSlot] = startIcon, _a))), (config.endIconSlot && (_b = {}, _b[config.endIconSlot] = endIcon, _b))), (_c = {}, _c[config.contentSlot] = children, _c));
|
|
2595
2595
|
var overrides = (_d = {},
|
|
2596
2596
|
_d[config.root] = {
|
|
2597
|
-
as:
|
|
2598
|
-
props: __assign(__assign(__assign({
|
|
2597
|
+
as: link ? "a" : "button",
|
|
2598
|
+
props: __assign(__assign(__assign({
|
|
2599
|
+
// Put this at the top, as user may also have set `type` as
|
|
2600
|
+
// inherited from "button", so let `rest` override it
|
|
2601
|
+
type: htmlType }, omit.apply(void 0, __spreadArray(__spreadArray([rest], __read(plasmicClass.internalArgProps), false), __read(plasmicClass.internalVariantProps), false))), { ref: ref, disabled: isDisabled }), (!!link && { href: link })),
|
|
2599
2602
|
},
|
|
2600
2603
|
_d);
|
|
2601
2604
|
return {
|