gatsby-plugin-dark-mode icon indicating copy to clipboard operation
gatsby-plugin-dark-mode copied to clipboard

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

Open dipankarmaikap opened this issue 3 years ago • 0 comments

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.

dipankarmaikap avatar Jul 15 '21 17:07 dipankarmaikap