Class: PhlexKit::InlineCode
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::InlineCode
- Defined in:
- app/components/phlex_kit/typography/inline_code.rb
Overview
Inline <code>, ported from ruby_ui's RubyUI::InlineCode. Replaces the legacy
code.key utility. See heading.rb (same Typography family).
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ InlineCode
constructor
A new instance of InlineCode.
- #view_template(&block) ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ InlineCode
Returns a new instance of InlineCode.
5 6 7 |
# File 'app/components/phlex_kit/typography/inline_code.rb', line 5 def initialize(**attrs) @attrs = attrs end |
Instance Method Details
#view_template(&block) ⇒ Object
9 10 11 |
# File 'app/components/phlex_kit/typography/inline_code.rb', line 9 def view_template(&block) code(**mix({ class: "pk-inline-code" }, @attrs), &block) end |