mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com> Co-authored-by: Madison Kennedy <madison@Madisons-MacBook-Pro.local> Co-authored-by: BilalG1 <bg2002@gmail.com>
48 lines
764 B
Plaintext
48 lines
764 B
Plaintext
---
|
|
title: "<StackTheme />"
|
|
---
|
|
|
|
A component that applies a theme to its children.
|
|
|
|
For more information, please refer to the [color and styles guide](../customization/custom-styles.mdx).
|
|
|
|
## Props
|
|
|
|
<PropTable
|
|
props={[
|
|
{
|
|
name: "theme",
|
|
type: "ThemeConfig",
|
|
description: "Custom theme configuration to override the default theme.",
|
|
optional: true
|
|
},
|
|
{
|
|
name: "children",
|
|
type: "React.ReactNode",
|
|
description: "Child components to be rendered within the themed context.",
|
|
optional: true
|
|
}
|
|
]}
|
|
/>
|
|
|
|
## Example
|
|
|
|
```tsx
|
|
const theme = {
|
|
light: {
|
|
primary: 'red',
|
|
},
|
|
dark: {
|
|
primary: '#00FF00',
|
|
},
|
|
radius: '8px',
|
|
}
|
|
|
|
// ...
|
|
|
|
<StackTheme theme={theme}>
|
|
{/* children */}
|
|
</StackTheme>
|
|
|
|
```
|