Skip to content

Commit 135ab9d

Browse files
committed
docs: document Theme instead of deprecated ThemeProvider alias
Rename the theme-provider page to "Theme", drop the ThemeProvider deprecation callout, and rename ThemeProviderProps -> ThemeProps so the page documents only the current theming API (Theme, useTheme, ThemeSwitcher).
1 parent 7763452 commit 135ab9d

3 files changed

Lines changed: 3 additions & 7 deletions

File tree

apps/www/src/content/docs/components/theme-provider/demo.ts renamed to apps/www/src/content/docs/components/theme/demo.ts

File renamed without changes.

apps/www/src/content/docs/components/theme-provider/index.mdx renamed to apps/www/src/content/docs/components/theme/index.mdx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Theme Provider
2+
title: Theme
33
description: React API for theming — the Theme provider, useTheme hook, and ThemeSwitcher toggle.
44
source: packages/raystack/components/theme-provider
55
---
@@ -12,10 +12,6 @@ This page documents the React API for theming: the `Theme` provider component, t
1212

1313
`Theme` manages light/dark mode (including the `system` preference), persists the user's choice to localStorage, and applies the `style`, `accentColor`, and `grayColor` attributes that drive Apsara's design tokens. It injects a small inline script so the correct theme is applied before first paint, avoiding a flash of the wrong theme.
1414

15-
<Callout type="attention" highContrast variant="outline">
16-
`ThemeProvider` is a deprecated alias of `Theme` and will be removed in a future major release. Use `Theme` instead.
17-
</Callout>
18-
1915
## Anatomy
2016

2117
Wrap your application with the provider, then read or change the theme anywhere below it:
@@ -35,7 +31,7 @@ import { Theme, ThemeSwitcher, useTheme } from "@raystack/apsara";
3531

3632
The provider component. Rendered at the root it manages the document-level theme; rendered inside another `Theme` it becomes a scoped provider that overrides theme attributes for its subtree only (see [scoped theming](/docs/theme/overview#scoped-theming)).
3733

38-
<auto-type-table path="./props.ts" name="ThemeProviderProps" />
34+
<auto-type-table path="./props.ts" name="ThemeProps" />
3935

4036
### useTheme
4137

apps/www/src/content/docs/components/theme-provider/props.ts renamed to apps/www/src/content/docs/components/theme/props.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export type ThemeProviderProps = {
1+
export type ThemeProps = {
22
/**
33
* Default theme on first load
44
* @defaultValue "system"

0 commit comments

Comments
 (0)