Skip to content

Commit f9747e2

Browse files
authored
Merge pull request #20 from aesirxio/customize-detail
Customize detail & reject text
2 parents 84d996e + 342f0a0 commit f9747e2

5 files changed

Lines changed: 317 additions & 264 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aesirx-consent",
3-
"version": "1.0.6",
3+
"version": "1.0.7",
44
"license": "GPL-3.0-only",
55
"author": "AesirX",
66
"repository": "https://github.com/aesirxio/consent",

src/Components/ConsentCustom.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ import { getWeb3ID } from '../utils/Concordium';
5454
import { trackEvent, AnalyticsContext, startTracker } from 'aesirx-analytics';
5555
import ConsentHeader from './ConsentHeader';
5656
import { CustomizeCategory } from './CustomizeCategory';
57+
import { useWeb3Modal } from '@web3modal/react';
5758
declare global {
5859
interface Window {
5960
dataLayer: any;
@@ -72,6 +73,8 @@ const ConsentComponentCustom = ({
7273
layout,
7374
isOptInReplaceAnalytics,
7475
customConsentText,
76+
customDetailText,
77+
customRejectText,
7578
disabledBlockDomains,
7679
languageSwitcher,
7780
}: any) => {
@@ -91,6 +94,8 @@ const ConsentComponentCustom = ({
9194
gtmId={gtmId}
9295
layout={layout}
9396
customConsentText={customConsentText}
97+
customDetailText={customDetailText}
98+
customRejectText={customRejectText}
9499
disabledBlockDomains={disabledBlockDomains}
95100
languageSwitcher={languageSwitcher}
96101
/>
@@ -117,9 +122,10 @@ const ConsentComponentCustomWrapper = (props: any) => {
117122
showRevoke,
118123
handleRevoke,
119124
] = useConsentStatus(props?.endpoint, props?.layout, props);
125+
const { isOpen } = useWeb3Modal();
120126

121127
return (
122-
<div className="aesirxconsent">
128+
<div className={`aesirxconsent ${isOpen ? 'web3modal-open' : ''}`}>
123129
<SSOEthereumProvider layout={props?.layout} level={level}>
124130
<ConsentComponentCustomApp
125131
{...props}
@@ -131,6 +137,8 @@ const ConsentComponentCustomWrapper = (props: any) => {
131137
gtmId={props?.gtmId}
132138
layout={props?.layout}
133139
customConsentText={props?.customConsentText}
140+
customDetailText={props?.customDetailText}
141+
customRejectText={props?.customRejectText}
134142
disabledBlockDomains={props?.disabledBlockDomains}
135143
languageSwitcher={props?.languageSwitcher}
136144
uuid={uuid}
@@ -159,6 +167,8 @@ const ConsentComponentCustomApp = (props: any) => {
159167
gtmId,
160168
layout,
161169
customConsentText,
170+
customDetailText,
171+
customRejectText,
162172
disabledBlockDomains,
163173
languageSwitcher,
164174
activeConnectorType,
@@ -1317,6 +1327,8 @@ const ConsentComponentCustomApp = (props: any) => {
13171327
isCustom={true}
13181328
layout={layout}
13191329
customConsentText={customConsentText}
1330+
customDetailText={customDetailText}
1331+
customRejectText={customRejectText}
13201332
isRejectedLayout={showRejectedConsent}
13211333
languageSwitcher={languageSwitcher}
13221334
>

0 commit comments

Comments
 (0)