You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know what it sounds like - but no, I'm not rick-rolling you 🤣
Anticipating 2.0 I've decided to try lining up early to the party gettin' a feel for the amount of work awaiting me in order to rewrite my app for 2.0 - but I don't know, it's like this @buffer never sinks in with me (remember the form_with and friends issue of "Christmas Past") so what do you say - got one more for the old Man?
Say I'd like to "write some text and part of it will be strong and some even STRONGER" (it's a lot more complex and ambitious than that but I reckon this will suffice to get me 'cross)
Reading the new https://beta.phlex.fun/ from doctype to </html> I figured I could do something like
<%= render Components::Text.new do |t|
span { "write some text and part of it will be" }
strong { "strong" }
span { "and some even" }
Components:TextStrong.new() { "STRONGER" }
end %>
using
class Components::Text < Components::Base
attr_accessor :css
def initialize(css: nil)
@css = css || "text-base/6 text-zinc-500 sm:text-sm/6 dark:text-zinc-400"
end
def view_template(&)
p(class: css) { yield }
end
end
# frozen_string_literal: true
class Components::TextStrong < Components::Base
attr_accessor :css
def initialize(css: nil)
@css = css || "font-medium text-zinc-950 dark:text-white"
end
def view_template(&)
strong(class: css) { yield }
end
end
- but ah-no!
If I do
<%= render Components::Text.new do |c|
c.span {"write some text and part of it will be"}
c.strong {"strong"}
end %>
I can have 'strong' (as a small token of appreciation for all my elephantizing-the-glass-store
So - there's the lay of the land - but you gotta' give me some credit for sticking with Phlex for all this time
😅 not knowing what the f* I'm doing 😎
The text was updated successfully, but these errors were encountered:
I know what it sounds like - but no, I'm not rick-rolling you 🤣
Anticipating 2.0 I've decided to try lining up early to the party gettin' a feel for the amount of work awaiting me in order to rewrite my app for 2.0 - but I don't know, it's like this
@buffer
never sinks in with me (remember the form_with and friends issue of "Christmas Past") so what do you say - got one more for the old Man?Say I'd like to "write some text and part of it will be strong and some even STRONGER" (it's a lot more complex and ambitious than that but I reckon this will suffice to get me 'cross)
Reading the new https://beta.phlex.fun/ from
doctype
to</html>
I figured I could do something likeusing
- but ah-no!
If I do
I can have 'strong' (as a small token of appreciation for all my elephantizing-the-glass-store
So - there's the lay of the land - but you gotta' give me some credit for sticking with Phlex for all this time
😅 not knowing what the f* I'm doing 😎
The text was updated successfully, but these errors were encountered: