@asphalt-react/theme-provider

1.22.0 • Public • Published

ThemeProvider

ThemeProvider allows you to theme your app. You can even nest ThemeProviders to apply a theme on just a section of your app as well.

⚠️ ThemeProvider only works in secure contexts

Usage

import ThemeProvider from "@asphalt-react/theme-provider"
import Button from "@asphalt-react/button"

const customTheme = {
  // your theme tokens
}

function App() {
  return (
    <ThemeProvider theme={customTheme}>
      <Button>Click me</Button>
    </ThemeProvider>
  )
} 

Props

children

React node or node tree to apply theme to.

type required default
node true N/A

theme

Asphalt Theme object.

type required default
object false legacyVariables

as

Html element/React component to render as container.

type required default
elementType false "div"

Readme

Keywords

Package Sidebar

Install

npm i @asphalt-react/theme-provider

Weekly Downloads

14

Version

1.22.0

License

UNLICENSED

Unpacked Size

12.9 kB

Total Files

5

Last publish

Collaborators

  • shripriya.bhat
  • dawn29
  • itsjay26
  • sayantan1211
  • abhinav.preetu