@bikdotai/bik-component-library 0.0.97 → 0.0.98
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/cjs/components/states-modal/StateModalComponent.d.ts +1 -0
- package/dist/cjs/components/states-modal/StateModalComponent.js +1 -1
- package/dist/esm/components/states-modal/StateModalComponent.d.ts +1 -0
- package/dist/esm/components/states-modal/StateModalComponent.js +1 -1
- package/package.json +1 -1
|
@@ -14,5 +14,6 @@ export type StateModalComponentProps = {
|
|
|
14
14
|
leadingIcon?: React.FunctionComponent<React.SVGAttributes<SVGElement>>;
|
|
15
15
|
width?: number;
|
|
16
16
|
onClose?: () => void;
|
|
17
|
+
zIndex?: number;
|
|
17
18
|
};
|
|
18
19
|
export declare const StateModalComponent: React.FC<StateModalComponentProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("../../assets/icons/errorIcon.svg.js"),s=require("../../assets/icons/successIcon.svg.js"),o=require("../../assets/icons/warningIcon.svg.js"),r=require("../modals/Modal.js"),a=require("../spinner/Spinner.js"),i=require("../states/StateComponent.js");exports.StateModalComponent=c=>{const u=()=>l==i.StateInterface.SUCCESS?e.jsx(s.default,{}):l==i.StateInterface.WARNING?e.jsx(o.default,{}):l==i.StateInterface.ERROR?e.jsx(n.default,{}):l===i.StateInterface.LOADING?e.jsx(a.Spinner,{size:"large"}):void 0,{states:l,heading:d,subline:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("../../assets/icons/errorIcon.svg.js"),s=require("../../assets/icons/successIcon.svg.js"),o=require("../../assets/icons/warningIcon.svg.js"),r=require("../modals/Modal.js"),a=require("../spinner/Spinner.js"),i=require("../states/StateComponent.js");exports.StateModalComponent=c=>{const u=()=>l==i.StateInterface.SUCCESS?e.jsx(s.default,{}):l==i.StateInterface.WARNING?e.jsx(o.default,{}):l==i.StateInterface.ERROR?e.jsx(n.default,{}):l===i.StateInterface.LOADING?e.jsx(a.Spinner,{size:"large"}):void 0,{states:l,heading:d,subline:I,icon:j=u(),isButtonEnabled:S,type:x,buttonText:C,onButtonClick:f,leadingIcon:p,width:g,zIndex:b}=c,[q,O]=t.useState(!0);return e.jsx(r.Modal,Object.assign({open:q,onClose:function(){c.onClose&&c.onClose(),O(!1)},closeOnOutsideClick:!(l===i.StateInterface.LOADING),centralContainerStyles:{display:"flex",alignItems:"center",justifyContent:"center",width:g},hideCrossButton:l===i.StateInterface.LOADING,zIndex:b},{children:e.jsx(i.StateComponent,{states:l,heading:d,subline:I,isButtonEnabled:S,leadingIcon:p,type:x,buttonText:C,onButtonClick:f,icon:j,width:g||400})}))};
|
|
@@ -14,5 +14,6 @@ export type StateModalComponentProps = {
|
|
|
14
14
|
leadingIcon?: React.FunctionComponent<React.SVGAttributes<SVGElement>>;
|
|
15
15
|
width?: number;
|
|
16
16
|
onClose?: () => void;
|
|
17
|
+
zIndex?: number;
|
|
17
18
|
};
|
|
18
19
|
export declare const StateModalComponent: React.FC<StateModalComponentProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{useState as n}from"react";import o from"../../assets/icons/errorIcon.svg.js";import s from"../../assets/icons/successIcon.svg.js";import e from"../../assets/icons/warningIcon.svg.js";import{Modal as i}from"../modals/Modal.js";import{Spinner as r}from"../spinner/Spinner.js";import{StateInterface as c,StateComponent as a}from"../states/StateComponent.js";const l=l=>{const m=()=>d==c.SUCCESS?t(s,{}):d==c.WARNING?t(e,{}):d==c.ERROR?t(o,{}):d===c.LOADING?t(r,{size:"large"}):void 0,{states:d,heading:p,subline:u,icon:C=m(),isButtonEnabled:
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{useState as n}from"react";import o from"../../assets/icons/errorIcon.svg.js";import s from"../../assets/icons/successIcon.svg.js";import e from"../../assets/icons/warningIcon.svg.js";import{Modal as i}from"../modals/Modal.js";import{Spinner as r}from"../spinner/Spinner.js";import{StateInterface as c,StateComponent as a}from"../states/StateComponent.js";const l=l=>{const m=()=>d==c.SUCCESS?t(s,{}):d==c.WARNING?t(e,{}):d==c.ERROR?t(o,{}):d===c.LOADING?t(r,{size:"large"}):void 0,{states:d,heading:p,subline:u,icon:C=m(),isButtonEnabled:I,type:f,buttonText:g,onButtonClick:j,leadingIcon:b,width:h,zIndex:x}=l,[O,S]=n(!0);return t(i,Object.assign({open:O,onClose:function(){l.onClose&&l.onClose(),S(!1)},closeOnOutsideClick:!(d===c.LOADING),centralContainerStyles:{display:"flex",alignItems:"center",justifyContent:"center",width:h},hideCrossButton:d===c.LOADING,zIndex:x},{children:t(a,{states:d,heading:p,subline:u,isButtonEnabled:I,leadingIcon:b,type:f,buttonText:g,onButtonClick:j,icon:C,width:h||400})}))};export{l as StateModalComponent};
|