<TryYourSizeProvider>
Esta página aún no está disponible en tu idioma.
Creates (or adopts) the TryYourSize client and its elements group for the components inside it. Pass either publishableKey or client; it cannot change once set.
function TryYourSizeProvider(props: TryYourSizeProviderProps): ReactNodechildrenReactNodeOpcionaloptionsTryYourSizeProviderOptionsOpcionalPropiedades
embedOriginstringOpcionalDevelopment override of our windows' origin (e.g. http://localhost:5173). Used with publishableKey.
apiOriginstringOpcionalDevelopment override of the API origin (e.g. http://localhost:8000): the A/B holdout config.
localeLocaleOpcionalLanguage of our windows; "auto" follows the browser.
appearanceAppearanceOpcionalLook and feel. Changes are applied live with elements.update().
publishableKeystringOpcionalEither this or client. Your publishable key (pk_test_… / pk_live_…). The provider calls TryYourSize().
clientTryYourSizeClient | Promise<TryYourSizeClient | null> | nullOpcionalEither this or publishableKey. A client, a promise of one (for example loadTryYourSize(pk)), or null while you don't have one yet.
Example
Section titled “Example”// With a key<TryYourSizeProvider publishableKey="pk_test_…" options={{ locale: "es" }}> <App /></TryYourSizeProvider>
// With the CDN loader (SSR-safe)const tysPromise = loadTryYourSize("pk_test_…");<TryYourSizeProvider client={tysPromise}> <App /></TryYourSizeProvider>// Without Reactconst tys = TryYourSize("pk_test_…", { locale: "es" });const elements = tys.elements();¿Te ha resultado útil esta página?
Gracias. Leemos todas las respuestas.