Skip to content
This repository was archived by the owner on Sep 20, 2022. It is now read-only.
This repository was archived by the owner on Sep 20, 2022. It is now read-only.

base styles and plugin support #6

@tyrauber

Description

@tyrauber

What is the API for implementing plugins and base styles? For example, configuring dark mode by adding a base style class. Tailwindcss documentation suggests something like this:

const plugin = require('tailwindcss/plugin')
module.exports = {
  darkMode: 'class',
  plugins: [
    plugin(function({ addBase, theme }) {
      addBase({
        light: {
          color: "#000",
          backgroundColor: "#fff"
        },
        dark: {
          color: "#fff",
          backgroundColor: "#000"
        }
      })
    })
  ],
  ....

Unfortunately, running npx tailwind-react-native@latest build doesn't export those new styles to style.json.

Also, something I noticed through this process, tailwindcss isn't included as a dependency? I was curious why that was.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions