We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3242451 commit 24ec395Copy full SHA for 24ec395
opal/lissio/component.rb
@@ -127,10 +127,16 @@ def self.html(string = nil, &block)
127
end
128
129
130
- def self.text(string)
131
- render {
132
- element.content = string
133
- }
+ def self.text(string = nil, &block)
+ if block
+ render {
+ element.content = instance_exec(&block)
134
+ }
135
+ else
136
137
+ element.content = string
138
139
+ end
140
141
142
def self.css!(content = nil, &block)
0 commit comments