CgsTheme

fun CgsTheme(colorScheme: CgsColors = CgsTheme.colorScheme, typography: CgsTypography = CgsTheme.typography, content: @Composable () -> Unit)

Provides the SDK's design system to everything composed inside it.

Wrap any SDK screen or component in this. Left alone it uses the SDK's own palette and type scale; pass a colorScheme to make it match your app:

CgsTheme(colorScheme = cgsColorScheme(isSystemInDarkTheme())) {
PublicationScreen(publicationId = id, onEvent = ::handle)
}

To derive a whole scheme from your brand color instead, use cgsColorScheme(darkTheme, brand, accent).

Light and dark are not switched automatically — pass the scheme you want. This is deliberate: an app that offers its own theme setting should not have the SDK follow the system behind its back.

Parameters

colorScheme

the palette to draw with. Defaults to whatever is already provided, or the SDK's light scheme at the root.

typography

the type scale to draw with. Defaults to whatever is already provided, or the SDK's own at the root.

content

what to compose under this theme.