@launchpad-ui/button
Advanced tools
Comparing version 0.2.3 to 0.3.0
@@ -10,6 +10,2 @@ /// <reference types="react" /> | ||
/** | ||
* Component to use for the button; defaults to `button`, or `a` if `href` or `target` is provided | ||
*/ | ||
component?: unknown; | ||
/** | ||
* When true, this property will disable the button and show the `loadingText` | ||
@@ -16,0 +12,0 @@ */ |
@@ -113,3 +113,2 @@ // ../../scripts/react-shim.js | ||
const { | ||
component, | ||
isLoading: isLoading2, | ||
@@ -126,7 +125,5 @@ loadingText: loadingText2, | ||
} = props; | ||
const ButtonComponent2 = component || "a"; | ||
return /* @__PURE__ */ React.createElement(ButtonComponent2, { | ||
return /* @__PURE__ */ React.createElement("a", { | ||
...otherProps, | ||
...extraProps2, | ||
role: "button", | ||
"data-test-id": testId | ||
@@ -137,3 +134,2 @@ }, children2); | ||
const { | ||
component, | ||
type: type2, | ||
@@ -151,7 +147,7 @@ isLoading: isLoading2, | ||
} = props; | ||
const ButtonComponent2 = component || "button"; | ||
return /* @__PURE__ */ React.createElement(ButtonComponent2, { | ||
const buttonType = type2 && type2 !== "icon" /* ICON */ && type2 !== "borderless" /* BORDERLESS */ ? type2 : "button" /* BUTTON */; | ||
return /* @__PURE__ */ React.createElement("button", { | ||
...otherProps, | ||
...extraProps2, | ||
type: type2 && type2 !== "icon" /* ICON */ ? type2 : "button" /* BUTTON */, | ||
type: buttonType, | ||
"data-test-id": testId | ||
@@ -158,0 +154,0 @@ }, children2); |
@@ -146,3 +146,2 @@ "use strict"; | ||
const { | ||
component, | ||
isLoading: isLoading2, | ||
@@ -159,7 +158,5 @@ loadingText: loadingText2, | ||
} = props; | ||
const ButtonComponent2 = component || "a"; | ||
return /* @__PURE__ */ React.createElement(ButtonComponent2, { | ||
return /* @__PURE__ */ React.createElement("a", { | ||
...otherProps, | ||
...extraProps2, | ||
role: "button", | ||
"data-test-id": testId | ||
@@ -170,3 +167,2 @@ }, children2); | ||
const { | ||
component, | ||
type: type2, | ||
@@ -184,7 +180,7 @@ isLoading: isLoading2, | ||
} = props; | ||
const ButtonComponent2 = component || "button"; | ||
return /* @__PURE__ */ React.createElement(ButtonComponent2, { | ||
const buttonType = type2 && type2 !== "icon" /* ICON */ && type2 !== "borderless" /* BORDERLESS */ ? type2 : "button" /* BUTTON */; | ||
return /* @__PURE__ */ React.createElement("button", { | ||
...otherProps, | ||
...extraProps2, | ||
type: type2 && type2 !== "icon" /* ICON */ ? type2 : "button" /* BUTTON */, | ||
type: buttonType, | ||
"data-test-id": testId | ||
@@ -191,0 +187,0 @@ }, children2); |
{ | ||
"name": "@launchpad-ui/button", | ||
"version": "0.2.3", | ||
"version": "0.3.0", | ||
"status": "beta", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
87215
588