defmodule ClickToComponent do @moduledoc """ Documentation for `ClickToComponent`. """ require Logger @enabled? Application.compile_env(:click_to_component, :enabled, false) if @enabled? and !Application.compile_env(:phoenix_live_view, :debug_heex_annotations) do Logger.warning(""" ClickToComponent requires :debug_heex_annotations to be enabled. Add the following configuration in your `config/dev.exs` file: config :phoenix_live_view, debug_heex_annotations: true """) end if !@enabled? and Application.compile_env(:phoenix_live_view, :debug_heex_annotations) do Logger.warning(""" It looks like :debug_heex_annotations is enabled, but ClickToComponent is not. To enable, add the following configuration in your `config/dev.exs` file: config :click_to_component, enabled: true """) end @doc """ Renders the ClickToComponent hook. Add to your `lib/my_app_web/layouts/root.html.heex` file as follows: ```html