updated docs
This commit is contained in:
@@ -22,7 +22,7 @@ export default { plugins: { '@tailwindcss/postcss': {} } }
|
||||
W globalnym CSS (np. app/(frontend)/styles.css):
|
||||
```css
|
||||
@import "tailwindcss";
|
||||
@source "../../../node_modules/ipal-kit/dist/**/*.js";
|
||||
@source "../../../node_modules/@intecion/ipal-kit/dist/**/*.js";
|
||||
```
|
||||
|
||||
**@source jest kluczowy** — Tailwind domyślnie NIE skanuje node_modules, więc
|
||||
@@ -107,7 +107,7 @@ też jedno źródło.
|
||||
// src/middleware.ts
|
||||
import { NextResponse } from 'next/server'
|
||||
import type { NextRequest } from 'next/server'
|
||||
import { createLocaleMiddleware } from 'ipal-kit/next/middleware'
|
||||
import { createLocaleMiddleware } from '@intecion/ipal-kit/next/middleware'
|
||||
import { i18nConfig } from '@/i18n.config'
|
||||
|
||||
const localeMiddleware = createLocaleMiddleware({ config: i18nConfig })
|
||||
@@ -140,8 +140,8 @@ Layout (server) czyta getConsentTexts, przekazuje jako prop do ConsentProvider
|
||||
(client). Banner + button renderują się same:
|
||||
|
||||
```ts
|
||||
import { getConsentTexts } from 'ipal-kit'
|
||||
import { ConsentProvider, CookieBanner, CookieButton } from 'ipal-kit/client'
|
||||
import { getConsentTexts } from '@intecion/ipal-kit'
|
||||
import { ConsentProvider, CookieBanner, CookieButton } from '@intecion/ipal-kit/client'
|
||||
|
||||
const texts = await getConsentTexts({ config, locale, payload, privacyPolicy })
|
||||
// <ConsentProvider texts={texts}>{children}<CookieBanner/><CookieButton/></ConsentProvider>
|
||||
@@ -173,9 +173,9 @@ const enhanceProps = ({ block }) => {
|
||||
|
||||
- FormRenderer (client) — renderuje pola form-buildera (text/email/select/
|
||||
country/checkbox/textarea/number/state/message)
|
||||
- Turnstile widget (ipal-kit/client) — siteKey jako prop, wstrzykiwany przez
|
||||
- Turnstile widget (@intecion/ipal-kit/client) — siteKey jako prop, wstrzykiwany przez
|
||||
enhanceProps (z SiteIntegrations, publiczny — bezpieczny na kliencie)
|
||||
- server action → submitForm (ipal-kit/server) — weryfikuje Turnstile i zapisuje
|
||||
- server action → submitForm (@intecion/ipal-kit/server) — weryfikuje Turnstile i zapisuje
|
||||
|
||||
Maili NIE składa się w kodzie. Po zapisie submission form-builder sam wysyła
|
||||
wiadomości skonfigurowane przez edytora (Forms → dany formularz → Emails:
|
||||
@@ -185,7 +185,7 @@ Email To / CC / BCC / Subject / Message z placeholderami {{pole}}, {{*}},
|
||||
Wymaga w payload.config:
|
||||
|
||||
```ts
|
||||
import { ipalKit, panelSmtpAdapter } from 'ipal-kit'
|
||||
import { ipalKit, panelSmtpAdapter } from '@intecion/ipal-kit'
|
||||
|
||||
export default buildConfig({
|
||||
email: panelSmtpAdapter(),
|
||||
|
||||
Reference in New Issue
Block a user