sample("Paragraph in two rows", slug: "paragraph") do
render NitroKit::Textarea.new(
id: "gallery-textarea-hostile-paragraph",
aria: { label: Gallery::Hostile::LONG_LABEL },
name: "hostile[paragraph]",
value: Gallery::Hostile::LONG_PARAGRAPH,
rows: 2
)
end
sample("Unbroken word", slug: "word") do
render NitroKit::Textarea.new(
id: "gallery-textarea-hostile-word",
aria: { label: Gallery::Hostile::LONG_LABEL },
name: "hostile[word]",
value: ([ Gallery::Hostile::LONG_WORD ] * 3).join,
rows: 3
)
end
sample("Long URL, no wrap", slug: "url") do
render NitroKit::Textarea.new(
id: "gallery-textarea-hostile-url",
aria: { label: Gallery::Hostile::LONG_LABEL },
name: "hostile[url]",
value: Gallery::Hostile::LONG_URL,
wrap: :off,
rows: 3
)
end
sample("Paragraph placeholder", slug: "placeholder") do
render NitroKit::Textarea.new(
id: "gallery-textarea-hostile-placeholder",
aria: { label: Gallery::Hostile::LONG_LABEL },
name: "hostile[placeholder]",
value: "",
placeholder: Gallery::Hostile::LONG_PARAGRAPH,
rows: 3
)
end
sample("Mixed scripts", slug: "scripts") do
render NitroKit::Textarea.new(
id: "gallery-textarea-hostile-scripts",
aria: { label: Gallery::Hostile::LONG_LABEL },
name: "hostile[scripts]",
value: Gallery::Hostile::NAMES.join("\n"),
rows: 4
)
end