updated docs
This commit is contained in:
+6
-6
@@ -23,12 +23,12 @@ localized. Link do polityki prywatności bierze się z system pages
|
||||
## Front — Provider + banner
|
||||
|
||||
Provider owija aplikację, banner i button renderują się same. Import z
|
||||
`ipal-kit/client`:
|
||||
`@intecion/ipal-kit/client`:
|
||||
|
||||
```tsx
|
||||
// app/(frontend)/[locale]/layout.tsx
|
||||
import { ConsentProvider, CookieBanner, CookieButton } from 'ipal-kit/client'
|
||||
import { getConsentTexts } from 'ipal-kit'
|
||||
import { ConsentProvider, CookieBanner, CookieButton } from '@intecion/ipal-kit/client'
|
||||
import { getConsentTexts } from '@intecion/ipal-kit'
|
||||
|
||||
export default async function Layout({ children, params }) {
|
||||
const { locale } = await params
|
||||
@@ -66,15 +66,15 @@ Domyślne klasy Tailwind można nadpisać przez `classNames`:
|
||||
## Gating skryptów wg zgody
|
||||
|
||||
```ts
|
||||
import { updateConsent, setDefaultConsent } from 'ipal-kit'
|
||||
import { updateConsent, setDefaultConsent } from '@intecion/ipal-kit'
|
||||
// wysyła sygnały do Google Consent Mode (gtag) na podstawie stanu zgody
|
||||
```
|
||||
|
||||
Logika (kategorie, storage, parsowanie) też jest dostępna server-safe z
|
||||
`ipal-kit`:
|
||||
`@intecion/ipal-kit`:
|
||||
|
||||
```ts
|
||||
import { parseConsent, CONSENT_COOKIE, CONSENT_CATEGORIES } from 'ipal-kit'
|
||||
import { parseConsent, CONSENT_COOKIE, CONSENT_CATEGORIES } from '@intecion/ipal-kit'
|
||||
// np. gating skryptów server-side na podstawie cookie zgody
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user