> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# withTheme()

- Package: [@gooddata/sdk-ui-theme-provider](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-theme-provider/index.md)
- Kind: function
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-ui-theme-provider/src/ThemeProvider/Context.tsx

Injects both theme object and isThemeLoading flag into component as properties

**Signature:**

```typescript
export declare function withTheme<T extends {
    theme?: ITheme;
    workspace?: string;
}>(Component: ComponentType<T>): ComponentType<Omit<T, "theme" | "themeIsLoading" | "themeStatus">>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| Component | ComponentType&lt;T&gt; |  |

**Returns:**

ComponentType&lt;Omit&lt;T, "theme" &#124; "themeIsLoading" &#124; "themeStatus"&gt;&gt;
