app/views/examples/components/badge.html.erb in shadcn-ui-0.0.2 vs app/views/examples/components/badge.html.erb in shadcn-ui-0.0.3

- old
+ new

@@ -16,15 +16,22 @@ <%= render_badge text: "Outline", variant: :outline %> </div> <div class="w-full mx-auto flex justify-center"> <%= render_badge text: "Ghost", variant: :ghost %> </div> -<div class="w-full mx-auto flex justify-center"> - <%= render_badge text: "Ghost Link", variant: :ghost, as: :link %> -</div> <% end %> +<% content_for :code, flush: true do %> + <%= code_partial("badge/code/preview", :erb) %> +<% end %> + <%= render_preview %> <h2 class="font-heading scroll-m-20 border-b pb-2 text-2xl font-semibold tracking-tight first:mt-0" id="installation">Installation</h2> +<%= code_sample(language: "sh") do %> + rails generate shadcn-ui badge +<% end %> -<h2 class="font-heading mt-12 scroll-m-20 border-b pb-2 mb-2 text-2xl font-semibold tracking-tight first:mt-0" id="usage"><a href="/docs/components/dialog#usage">Usage</a></h2> +<h2 class="font-heading mt-12 scroll-m-20 border-b pb-2 mb-2 text-2xl font-semibold tracking-tight first:mt-0" id="usage">Usage</h2> +<%= code_partial("badge/code/usage", :erb) %> + +<%= render_usage("badge") %>