Update Light & Dark Theme

While you can set your theme in our Dashboard, a lot of site support users switching between light and dark theme and it's important that our SDK updates to match the theme of the site.

You can update whether you want to show the Light or Dark theme to customers by passing a prop to the SDK with ThemeSettings:

<DynamicContextProvider
  theme='dark', <-- you can pass either 'dark' or 'light'
  settings={{
    environmentId: "1234abcd-1234-abcd-1234-abcd12343abc",
    appName: "My Cool App",
    appLogoUrl: "..."
    apiBaseUrl: "https://app.dynamic.xyz/api/v0",
  }}>
  <HomePage />
</DynamicContextProvider>