diff --git a/app/views/docs/installations/show_view.rb b/app/views/docs/installations/show_view.rb index 772b789..bf608c3 100644 --- a/app/views/docs/installations/show_view.rb +++ b/app/views/docs/installations/show_view.rb @@ -183,7 +183,7 @@ def render_ruby_dependencies_section end p do - "2. Include the PhlexyUI module in ApplicationComponent:" + "2. (Optional) Include the PhlexyUI module in ApplicationComponent:" end Code(:ruby, source: <<~RB) do @@ -193,6 +193,36 @@ class ApplicationComponent < Phlex::HTML RB end + p do + "Including PhlexyUI is necessary if you want to use PhlexyUI components using the short-form syntax provided by Phlex::Kit. For example:" + end + + Code(:ruby, source: <<~RB) do + class SomeView < ApplicationView + def view_template + Button :primary do + "Hello, world!" + end + end + end + RB + end + + p do + "If you don't include PhlexyUI in ApplicationComponent, you can use the long-form syntax:" + end + + Code(:ruby, source: <<~RB) do + class SomeView < ApplicationView + def view_template + PhlexyUI::Button :primary do + "Hello, world!" + end + end + end + RB + end + p do "3. Update your tailwind.config.js file to include PhlexyUI styles:" end