Skip to content

ConsentBannerProps

type ConsentBannerProps = {
children: (api) => ReactNode;
};

Defined in: banner.tsx:4

Type declaration

NameTypeDescriptionDefined in
children(api) => ReactNodeRender-prop receiving the full consent API. Lets you build a banner with your own components/styling. Returns nothing if the banner is closed. Example <ConsentBanner> {({ resolved, grantAll, denyAll, save }) => ( <div> {resolved.map((c) => <CategoryRow key={c.id} category={c} />)} <button onClick={denyAll}>Reject All</button> <button onClick={grantAll}>Accept All</button> </div> )} </ConsentBanner>banner.tsx:22