infinity-forge 11.7.6 → 11.7.7
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ButtonProps } from './interfaces.js';
|
|
2
|
-
export declare function Button({ text, href, type, loading, svg, target, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function Button({ text, href, type, loading, svg, target, children, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -66,9 +66,9 @@ var system_1 = require("../../../system/index.js");
|
|
|
66
66
|
var S = __importStar(require("./styles.js"));
|
|
67
67
|
function Button(_a) {
|
|
68
68
|
var _b;
|
|
69
|
-
var text = _a.text, href = _a.href, type = _a.type, loading = _a.loading, svg = _a.svg, target = _a.target, props = __rest(_a, ["text", "href", "type", "loading", "svg", "target"]);
|
|
69
|
+
var text = _a.text, href = _a.href, type = _a.type, loading = _a.loading, svg = _a.svg, target = _a.target, children = _a.children, props = __rest(_a, ["text", "href", "type", "loading", "svg", "target", "children"]);
|
|
70
70
|
var Configurations = (0, system_1.useInfraInjection)().Configurations;
|
|
71
|
-
var contentButton = ((0, jsx_runtime_1.jsxs)("div", { className: 'button-icon', children: [svg && !loading && (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: svg }), loading ? (0, jsx_runtime_1.jsx)(ui_1.LoaderCircle, { size: 30, color: '#fff' }) : (0, jsx_runtime_1.jsx)("span", { children: text })] }));
|
|
71
|
+
var contentButton = ((0, jsx_runtime_1.jsxs)("div", { className: 'button-icon', children: [svg && !loading && (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: svg }), loading ? (0, jsx_runtime_1.jsx)(ui_1.LoaderCircle, { size: 30, color: '#fff' }) : children ? children : (0, jsx_runtime_1.jsx)("span", { children: text })] }));
|
|
72
72
|
var Styles = ((_b = Configurations === null || Configurations === void 0 ? void 0 : Configurations.styles) === null || _b === void 0 ? void 0 : _b.Button) || S.Button;
|
|
73
73
|
return ((0, jsx_runtime_1.jsx)(Styles, { "$loading": loading, children: href && !type ? ((0, jsx_runtime_1.jsx)(link_1.default, __assign({ href: href, target: target }, props, { children: contentButton }))) : ((0, jsx_runtime_1.jsx)("button", __assign({ type: type || 'submit', disabled: loading }, props, { children: contentButton }))) }));
|
|
74
74
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/ui/components/button/component.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,wBA0BC;;AAnCD,mDAA4B;AAE5B,2BAAyC;AACzC,mCAA4C;AAI5C,0CAA6B;AAE7B,SAAgB,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/ui/components/button/component.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,wBA0BC;;AAnCD,mDAA4B;AAE5B,2BAAyC;AACzC,mCAA4C;AAI5C,0CAA6B;AAE7B,SAAgB,MAAM,CAAC,EAA2E;;IAAzE,IAAA,IAAI,UAAA,EAAE,IAAI,UAAA,EAAE,IAAI,UAAA,EAAE,OAAO,aAAA,EAAE,GAAG,SAAA,EAAE,MAAM,YAAA,EAAE,QAAQ,cAAA,EAAK,KAAK,cAA5D,gEAA8D,CAAF;IACzE,IAAA,cAAc,GAAK,IAAA,0BAAiB,GAAE,eAAxB,CAAwB;IAE9C,IAAM,aAAa,GAAG,CACpB,iCAAK,SAAS,EAAC,aAAa,aACzB,GAAG,IAAI,CAAC,OAAO,IAAI,uBAAC,SAAI,IAAC,IAAI,EAAE,GAAG,GAAI,EAEtC,OAAO,CAAC,CAAC,CAAC,uBAAC,iBAAY,IAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAC,MAAM,GAAG,CAAC,CAAC,C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