module Components::AmberIntegration::ViewHelpers

Overview

Add reactive handler to Amber pipeline

Usage in config/routes.cr: pipeline :web do plug Components::Integration.reactive_handler end View helper module

Defined in:

components/integration.cr

Instance Method Summary

Instance Method Detail

def component(klass : Component.class, **params) #

Render a component in a view


[View source]
def css(&block : CSS::ClassBuilder -> Nil) : String #

CSS builder DSL


[View source]
def css_styles(config : CSS::Config | Nil = nil, mode : Symbol = :development) #

Include CSS styles


[View source]
def reactive_scripts(debug = false) #

Include reactive JavaScript


[View source]