Skip to content

Commit 9994597

Browse files
Deny button functionality in Desclaimer
1 parent a019fac commit 9994597

13 files changed

Lines changed: 46 additions & 6 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ You can also customize chatbot with different configuration
143143
buttonTextColor: 'white',
144144
blurredBackgroundColor: 'rgba(0, 0, 0, 0.4)', //The color of the blurred background that overlays the chat interface
145145
backgroundColor: 'white',
146+
denyButtonText: 'Cancel',
147+
denyButtonBgColor: '#ef4444'
146148
},
147149
customCSS: ``, // Add custom CSS styles. Use !important to override default styles
148150
chatWindow: {

dist/components/Bot.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ export type BotProps = {
102102
disclaimer?: DisclaimerPopUpTheme;
103103
dateTimeToggle?: DateTimeToggleTheme;
104104
renderHTML?: boolean;
105+
closeBot?: () => void;
105106
};
106107
export type LeadsConfig = {
107108
status: boolean;

dist/components/Bot.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/features/bubble/components/Bubble.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/features/bubble/types.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ export type DisclaimerPopUpTheme = {
101101
buttonText?: string;
102102
blurredBackgroundColor?: string;
103103
backgroundColor?: string;
104+
denyButtonBgColor?: string;
105+
denyButtonText?: string;
104106
};
105107
export type DateTimeToggleTheme = {
106108
date?: boolean;

dist/features/bubble/types.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
export type DisclaimerPopupProps = {
22
isOpen?: boolean;
3+
isFullPage?: boolean;
34
onAccept?: () => void;
5+
onDeny?: () => void;
46
title?: string;
57
message?: string;
68
buttonText?: string;
9+
denyButtonText?: string;
710
blurredBackgroundColor?: string;
811
backgroundColor?: string;
912
buttonColor?: string;
1013
textColor?: string;
1114
buttonTextColor?: string;
15+
denyButtonBgColor?: string;
1216
};
1317
export declare const DisclaimerPopup: (props: DisclaimerPopupProps) => import("solid-js").JSX.Element;
1418
//# sourceMappingURL=DisclaimerPopup.d.ts.map

dist/features/popup/components/DisclaimerPopup.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/web.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/Bot.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ export type BotProps = {
155155
disclaimer?: DisclaimerPopUpTheme;
156156
dateTimeToggle?: DateTimeToggleTheme;
157157
renderHTML?: boolean;
158+
closeBot?: () => void
158159
};
159160

160161
export type LeadsConfig = {
@@ -1640,6 +1641,10 @@ export const Bot = (botProps: BotProps & { class?: string }) => {
16401641
buttonTextColor={props.disclaimer?.buttonTextColor}
16411642
blurredBackgroundColor={props.disclaimer?.blurredBackgroundColor}
16421643
backgroundColor={props.disclaimer?.backgroundColor}
1644+
denyButtonBgColor={props.disclaimer?.denyButtonBgColor}
1645+
denyButtonText={props.disclaimer?.denyButtonText}
1646+
onDeny={props.closeBot}
1647+
isFullPage={props.isFullPage}
16431648
/>
16441649
)}
16451650
</>

0 commit comments

Comments
 (0)