Twilio Paste

Theme Provider

The Paste ThemeProvider leverages React’s Context to provide the theme object to any descendant components in the tree. For that reason, we recommend wrapping your application at the root level with the Paste ThemeProvider. This allows all sub-components to retrieve the correct token value for the supplied theme.

import {Theme} from '@twilio-paste/theme';
<Theme.Provider theme="default">
  <App />