Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/theme/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

### Documentation

- Document that `ThemeProvider` does not accept wrapper customization props ([#79763](https://github.com/WordPress/gutenberg/pull/79763)).
- Clarify the design token documentation entry points and keep the generated token guidance source internal ([#79829](https://github.com/WordPress/gutenberg/pull/79829)).
- Clarify that `--wpds-color-stroke-focus` is a standalone exception to the normal color token naming pattern ([#79764](https://github.com/WordPress/gutenberg/pull/79764)).

Expand Down
2 changes: 2 additions & 0 deletions packages/theme/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ The `cornerRadius` prop sets the overall roundness preset for the theme subtree.

When the `color`, `cursor`, or `cornerRadius` prop is omitted, the theme inherits the value from the closest parent `ThemeProvider`, or uses the default value if none is inherited.

`ThemeProvider` does not accept wrapper customization props such as `className`, `style`, `as`, `render`, or `ref`.

### Nesting Providers

The provider can be used recursively to override or modify the theme for a specific subtree.
Expand Down
6 changes: 6 additions & 0 deletions packages/theme/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ export interface ThemeProviderSettings {
cornerRadius?: CornerRadiusPreset;
}

/**
* Props for the `ThemeProvider` component.
*
* The provider's wrapper element is intentionally not customizable and does
* not accept props such as `className`, `style`, `as`, `render`, or `ref`.
*/
export interface ThemeProviderProps extends ThemeProviderSettings {
/**
* The children to render.
Expand Down
Loading