gatsby-plugin-click-to-react-component

1.0.1 • Public • Published

gatsby-plugin-click-to-react-component

Provides drop-in features for click-to-component.

Install

npm install click-to-react-component gatsby-plugin-click-to-react-component

How to use

  1. Include the plugin in your gatsby-config.js file.
plugins: [
  ...
  `gatsby-plugin-click-to-react-component`,
  ...
]
  1. Use as described in click-to-component's docs!

Configuration

In gatsby-config.js, configuration can be set as follows:

plugins: [
  ...
  {
    resolve: `gatsby-plugin-click-to-react-component`,
    options: {
      // whether or not click-to-react-component is enabled
      // the library auto-tree shakes in production mode already
      // this would be useful for other environmental situations
      enabled: true,
      
      // any other options passed here will be passed into
      // <ClickToComponent {...pluginOptions} /> for
      // future compatibility
    }
  },
  ...
]

Package Sidebar

Install

npm i gatsby-plugin-click-to-react-component

Weekly Downloads

44

Version

1.0.1

License

MIT

Unpacked Size

3.47 kB

Total Files

11

Last publish

Collaborators

  • j0sh77