2.1.0 • Published 7 months ago

@asphalt-react/theme-provider v2.1.0

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
7 months ago

ThemeProvider

npm npm version

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.

typerequireddefault
nodetrueN/A

theme

Asphalt Theme object.

typerequireddefault
objectfalselegacyVariables

as

Html element/React component to render as container.

typerequireddefault
elementTypefalse"div"
2.0.0-rc.11

11 months ago

2.1.0

7 months ago

2.0.1

8 months ago

2.0.0

10 months ago

2.0.0-rc.4

1 year ago

2.0.0-rc.0

1 year ago

2.0.0-alpha.28

2 years ago

2.0.0-alpha.19

2 years ago

2.0.0-alpha.16

3 years ago

1.22.0

3 years ago

2.0.0-alpha.13

3 years ago

2.0.0-alpha.8

3 years ago

1.17.0

3 years ago

2.0.0-alpha.4

3 years ago

2.0.0-alpha.6

3 years ago

1.16.0

3 years ago

2.0.0-alpha.7

3 years ago

2.0.0-alpha.3

3 years ago

1.14.1

3 years ago

2.0.0-alpha.2

4 years ago

2.0.0-alpha.1

4 years ago

1.13.0

4 years ago