@adyen/kyc-components
Version:
This guide assumes that you have already an account with Adyen. A legalEntity needs to be created, and you need to have a `legalEntityId` to instatiate a Component.
30 lines (29 loc) • 1.2 kB
JavaScript
try {
let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "852b7c02-9ff1-4d5e-ae78-2570d7e8c03b", e._sentryDebugIdIdentifier = "sentry-dbid-852b7c02-9ff1-4d5e-ae78-2570d7e8c03b");
} catch (e) {}
import { t as useAnalyticsContext } from "./useAnalyticsContext-BVFDMrVE.js";
import { t as Alert } from "./Alert-C6gL3JIt.js";
import { jsx } from "preact/jsx-runtime";
//#region src/components/ui/molecules/ContextGuidance/ContextGuidance.tsx
function ContextGuidance({ title, content, titleId, contentId, trackingParams }) {
const userEvents = useAnalyticsContext();
const onGuidanceToggle = (status) => {
userEvents.addFieldEvent("Clicked accordion", {
actionType: status,
field: "context guidance",
label: titleId,
content: contentId,
...trackingParams
});
};
return /* @__PURE__ */ jsx(Alert, {
title,
type: "collapsible",
variant: "info",
onToggle: onGuidanceToggle,
children: content
});
}
//#endregion
export { ContextGuidance as t };