Skip to content

Commit

Permalink
Working
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfarrell76 committed Jan 5, 2024
1 parent 9eba6a5 commit 2737818
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ This banner can be used to notify users of privacy policy changes. This banner d

This banner can be used to notify users of privacy policy changes. It does not collect consent preferences, however, it will save a consent timestamp for whenever the user acknowledges the policy change, and closes the modal. This banner is similar to `PrivacyPolicyNotice`, however instead of using a button to close the modal - an X icon is used in the top right-hand corner of the modal.

![ViewState = PrivacyPolicyNoticeWithCloseButton](FIXME)
![ViewState = PrivacyPolicyNoticeWithCloseButton](https://github.com/transcend-io/consent-manager-ui/assets/10264973/54010d7f-905a-4014-8268-5915590b177b)

#### Button Mapping

Expand Down
2 changes: 1 addition & 1 deletion src/components/CloseButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { h, JSX } from 'preact';
import { useIntl } from 'react-intl';
import { messages } from 'src/messages';
import { messages } from '../messages';

/**
* Close button, useful for closing modal
Expand Down
12 changes: 12 additions & 0 deletions src/playground/airgapStub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,24 @@ const getPurposeTypes: AirgapAPI['getPurposeTypes'] = () => {
return JSON.parse(purposeTypes ?? {});
};

const AIRGAP_STATUS = {
protection: false,
csp: false,
monitoring: false,
telemetry: false,
};

export const airgapStub: AirgapAPI = {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
ready: (callback) => callback(airgapStub),
/** Queue of callbacks to dispatch once airgap is ready */
readyQueue: [],
toggle: () => {
AIRGAP_STATUS.protection = !AIRGAP_STATUS.protection;
return true;
},
status: AIRGAP_STATUS,
/** Enqueue cross-domain data sync across all airgap bundle domains */
sync: () => Promise.resolve(),
/** Resolve airgap request overrides for a URL */
Expand Down

0 comments on commit 2737818

Please sign in to comment.