Last active
March 15, 2024 03:11
-
-
Save megatux/5740835713bca329ebdf43c377f62a1a to your computer and use it in GitHub Desktop.
sample-02_bun_tw_phlex_htmx article_component.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "faker" | |
class ArticleComponent < ApplicationComponent | |
def template | |
article(class: "mb-2 bg-blue-600 rounded border-solid border-2 border-black item-article") { | |
h3(class: "text-left text-slate-200 pl-2 font-semibold") { | |
i { Faker::Lorem.sentence } | |
} | |
p(class: "bg-slate-200 p-4") { Faker::Lorem.paragraph } | |
} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment