Pilates
    Preparing search index...

    Function ThemeProvider

    • Wrap a subtree in <ThemeProvider> to override the active theme. Nested providers compose — the inner override merges over the outer.

      <ThemeProvider theme={lightTheme}>
        <App />
        <ThemeProvider theme={{ error: 'red' }}>
          <DangerZone />
        </ThemeProvider>
      </ThemeProvider>
      

      Parameters

      Returns FunctionComponentElement<ProviderProps<Theme | null>>