Sha256: c661f72b5905772fba6d781bd5e3bedecfb59a7dd50d0bddb172ba6d81d5846e

Contents?: true

Size: 715 Bytes

Versions: 3

Compression:

Stored size: 715 Bytes

Contents

<% base_classes =
  "px-4 py-2 rounded-full transition hover:opacity-90 hover:shadow border-2 font-semibold flex items-center justify-center gap-2 w-full"
variant_classes =
  case @variant
  when "primary"
    "border-black bg-black text-white"
  when "secondary"
    "border-gray-500 bg-gray-500 text-white"
  when "outline"
    "border-gray-500 text-gray-500"
  when "ghost"
    "border-transparent bg-transparent text-gray-500 hover:bg-gray-200"
  when "danger"
    "border-red-500 bg-red-500 text-white"
  else
    "bg-blue-500 text-white"
  end
tailwind_classes = "#{base_classes} #{variant_classes}" %>

<button type="<%= @type %>" class="<%= tailwind_classes %>">
  <%= content %>
  <%= @text %>">
</button>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
railwind-0.1.26 lib/railwind/generators/templates/button/_button_component.html.erb
railwind-0.1.25 lib/railwind/generators/templates/button/_button_component.html.erb
railwind-0.1.24 lib/railwind/generators/templates/button/_button_component.html.erb