-
-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Description
I'm using Kits. I have module Components, which extends Phlex::Kit, defined in config/initializers/phlex.rb.
My Panel component includes Components and it needs to render some namespaced sub-components like Panel::Heading and Panel::Body, etc. It seems that because of the namespacing, i can't use the shorter Kits syntax.
I'm getting NoMethodError for Heading in all these cases. None of the following work:
class Components::Panel < Components::Base
include Components
prop :heading, _Nilable(String), default: nil
...
def render_heading
# Panel::Heading(...) <- doesn't work
# Heading(...) <- doesn't work
# Panel.Heading(...) <- doesn't workTo be clear, this file exists at components/panel/heading.rb
class Components::Panel::Heading < Components::Base
# include Components <- doesn't work
...How do i render these sub components from Panel without calling render? The docs aren't explicit on this.
Metadata
Metadata
Assignees
Labels
No labels