@pitcher/theme

1.0.2 • Public • Published

@pitcher/theme

This is the JavaScript API to apply DaisyUI theme and expose basic theme CSS variables for Pitcher applications.

Usage

In the browser

Just include @pitcher/theme after @pitcher/js-api and theme will be applied automatically. You can optionally initialize it manually at any time if you want.

<!doctype html>
<html>
  <head>
    <title>My app</title>
    <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.0.4/dist/tailwind.min.css" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/daisyui@4.10.2/dist/styled.css" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/@pitcher/js-api"></script>
    <script src="https://cdn.jsdelivr.net/npm/@pitcher/theme"></script>
  </head>
  <body>
    <script>
      // optionally initialize the theme manually
      pitcherTheme.applyTheme(() => pitcher.usePitcherApi().getEnv())
    </script>
  </body>
</html>

Readme

Keywords

none

Package Sidebar

Install

npm i @pitcher/theme

Weekly Downloads

11

Version

1.0.2

License

none

Unpacked Size

253 kB

Total Files

4

Last publish

Collaborators

  • chantter
  • pegiadise
  • pitcherci
  • geokal94
  • aleetesting
  • dtornazakis
  • grzk