updated docs

This commit is contained in:
2026-08-04 19:37:23 +02:00
parent 9a45b3a50f
commit 90cbc4370f
19 changed files with 290 additions and 272 deletions
+6 -6
View File
@@ -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
```