@bikdotai/bik-component-library 0.0.403-beta.1 → 0.0.403-beta.2
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.
|
@@ -17,7 +17,7 @@ export type CurtainProps = {
|
|
|
17
17
|
strokeAtBottom?: boolean;
|
|
18
18
|
customComponent?: ComponentType<any>;
|
|
19
19
|
position?: 'sticky' | 'absolute' | 'fixed';
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
tertiaryButtonText?: string;
|
|
21
|
+
tertiaryButtonClickHandler?: () => void;
|
|
22
22
|
};
|
|
23
23
|
export declare const Curtain: React.FC<CurtainProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react/jsx-runtime"),e=require("react"),o=require("./Curtain.styled.js"),r=require("./CurtainHelper.js"),n=require("../TypographyStyle.js"),s=require("../../constants/Theme.js"),i=require("../../assets/icons/cross.svg.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react/jsx-runtime"),e=require("react"),o=require("./Curtain.styled.js"),r=require("./CurtainHelper.js"),n=require("../TypographyStyle.js"),s=require("../../constants/Theme.js"),i=require("../../assets/icons/cross.svg.js"),a=require("../button/Button.js");exports.Curtain=c=>{const[u,l]=e.useState(!1);if(u)return t.jsx(t.Fragment,{});return t.jsxs(o.CurtainStyle,Object.assign({isTeritaryButton:!!c.tertiaryButtonText,position:c.position,mode:c.mode,type:c.type,strokeAtTop:c.strokeAtTop,strokeAtBottom:c.strokeAtBottom},{children:[c.icon&&t.jsx(c.icon,{color:r.COLOR_CONFIG_MAP[c.mode][c.type].textColor,height:16,width:16}),t.jsx(n.BodySecondary,Object.assign({style:{color:r.COLOR_CONFIG_MAP[c.mode][c.type].textColor,marginLeft:8}},{children:c.text})),c.customComponent&&t.jsx(c.customComponent,{}),c.actionButtonText&&t.jsx(n.BodySecondaryLink,Object.assign({onClick:c.actionButtonClickHandler,style:{color:c.mode===r.CURTAIN_MODE.DARK?r.COLOR_CONFIG_MAP[c.mode][c.type].textColor:s.COLORS.content.brand,marginLeft:6,textDecoration:"underline"}},{children:c.actionButtonText})),t.jsxs(o.RightWrapper,{children:[c.tertiaryButtonText&&t.jsxs(t.Fragment,{children:[t.jsx(a.Button,{className:"tertiary-button",buttonText:c.tertiaryButtonText,onClick:c.tertiaryButtonClickHandler,buttonType:"tertiary"}),t.jsx(o.Separator,{mode:c.mode,type:c.type})]}),!c.hideCrossIcon&&t.jsx(i.default,{onClick:()=>{l(!0),c.onCloseHandler&&c.onCloseHandler()},cursor:"pointer",height:20,width:20,color:r.COLOR_CONFIG_MAP[c.mode][c.type].crossIconColor})]})]}))};
|
|
@@ -17,7 +17,7 @@ export type CurtainProps = {
|
|
|
17
17
|
strokeAtBottom?: boolean;
|
|
18
18
|
customComponent?: ComponentType<any>;
|
|
19
19
|
position?: 'sticky' | 'absolute' | 'fixed';
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
tertiaryButtonText?: string;
|
|
21
|
+
tertiaryButtonClickHandler?: () => void;
|
|
22
22
|
};
|
|
23
23
|
export declare const Curtain: React.FC<CurtainProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,Fragment as o,jsxs as e}from"react/jsx-runtime";import{useState as r}from"react";import{CurtainStyle as n,RightWrapper as i,Separator as s}from"./Curtain.styled.js";import{COLOR_CONFIG_MAP as c,CURTAIN_MODE as m}from"./CurtainHelper.js";import{BodySecondary as l,BodySecondaryLink as
|
|
1
|
+
import{jsx as t,Fragment as o,jsxs as e}from"react/jsx-runtime";import{useState as r}from"react";import{CurtainStyle as n,RightWrapper as i,Separator as s}from"./Curtain.styled.js";import{COLOR_CONFIG_MAP as c,CURTAIN_MODE as m}from"./CurtainHelper.js";import{BodySecondary as l,BodySecondaryLink as a}from"../TypographyStyle.js";import{COLORS as p}from"../../constants/Theme.js";import d from"../../assets/icons/cross.svg.js";import{Button as u}from"../button/Button.js";const y=y=>{const[C,h]=r(!1);if(C)return t(o,{});return e(n,Object.assign({isTeritaryButton:!!y.tertiaryButtonText,position:y.position,mode:y.mode,type:y.type,strokeAtTop:y.strokeAtTop,strokeAtBottom:y.strokeAtBottom},{children:[y.icon&&t(y.icon,{color:c[y.mode][y.type].textColor,height:16,width:16}),t(l,Object.assign({style:{color:c[y.mode][y.type].textColor,marginLeft:8}},{children:y.text})),y.customComponent&&t(y.customComponent,{}),y.actionButtonText&&t(a,Object.assign({onClick:y.actionButtonClickHandler,style:{color:y.mode===m.DARK?c[y.mode][y.type].textColor:p.content.brand,marginLeft:6,textDecoration:"underline"}},{children:y.actionButtonText})),e(i,{children:[y.tertiaryButtonText&&e(o,{children:[t(u,{className:"tertiary-button",buttonText:y.tertiaryButtonText,onClick:y.tertiaryButtonClickHandler,buttonType:"tertiary"}),t(s,{mode:y.mode,type:y.type})]}),!y.hideCrossIcon&&t(d,{onClick:()=>{h(!0),y.onCloseHandler&&y.onCloseHandler()},cursor:"pointer",height:20,width:20,color:c[y.mode][y.type].crossIconColor})]})]}))};export{y as Curtain};
|