Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin option added for adding class toggle position to html tag instead of body #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dipankarmaikap
Copy link

This added an option for user to change the class location from body to html tag.

Explanation

If user don't add any option it will work as its currently do. They have option for adding a optional option in the gatsby-config.js as shown below.

// gatsby-config.js

module.exports = {
  plugins: [
    {
      resolve: `gatsby-plugin-dark-mode`,
      options: {
        node: "html",
      },
    },
  ],
};

Why its useful ?

I use tailwindCSS for all of my projects and if I want to add base style for the dark mode in the body tag it does not work.

Option added for class toggle position and readme file updated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant