Sha256: a38a02911070ee6c4d6a6d1bcf00ba230c2616a697ca0f2325e93c9678caaca9

Contents?: true

Size: 445 Bytes

Versions: 13

Compression:

Stored size: 445 Bytes

Contents

# frozen_string_literal: true

module Views
	module Comments
		class Comment < ApplicationView
			def initialize(name:, body:)
				@name = name
				@body = body
			end

			def template(&block)
				div {
					span { @name }
					span { @body }

					yield_content(&block)

					render(::ReactionComponent.new(emoji: "hamburger")) do
						p { "Emoji reaction for a comment from #{@name} with body #{@body}" }
					end
				}
			end
		end
	end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
phlex-rails-0.4.2 fixtures/dummy/app/views/comments/comment.rb
phlex-rails-0.4.1 fixtures/dummy/app/views/comments/comment.rb
phlex-rails-0.4.0 fixtures/dummy/app/views/comments/comment.rb
phlex-rails-0.3.2 fixtures/dummy/app/views/comments/comment.rb
phlex-rails-0.3.1 fixtures/dummy/app/views/comments/comment.rb
phlex-rails-0.3.0 fixtures/dummy/app/views/comments/comment.rb
phlex-rails-0.2.2 fixtures/dummy/app/views/comments/comment.rb
phlex-rails-0.2.1 fixtures/dummy/app/views/comments/comment.rb
phlex-rails-0.2.0 fixtures/dummy/app/views/comments/comment.rb
phlex-0.5.3 fixtures/dummy/app/views/comments/comment.rb
phlex-0.5.2 fixtures/dummy/app/views/comments/comment.rb
phlex-0.5.1 fixtures/dummy/app/views/comments/comment.rb
phlex-0.5.0 fixtures/dummy/app/views/comments/comment.rb