Sha256: ace81d240bcb3652a26989fc4133d7770acc2f18fd666e4e8735e567ddcc1c22

Contents?: true

Size: 1.72 KB

Versions: 1

Compression:

Stored size: 1.72 KB

Contents

<%= render "layouts/documentation/component_header",
  title: "Accordion",
  description: "A vertically stacked set of interactive headings that each reveal a section of content." %>

<% content_for :preview, flush: true do %>
<div class="w-full">
  <%= render_accordion title: "Did you know?", description: "You can wrap shadcn helpers in any
  component library you want!" %>
  <%= render_accordion title: "Use the generators.", description: "Add components with #{code("rails g shadcn_ui add accordion")}".html_safe %>
</div>
<% end %>

<% content_for :code, flush: true do %>
  <%= code_partial("accordion/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 accodordion
<% 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>

<%= code_partial("accordion/code/usage", :erb) %>

<%= render_usage("accordion") %>

<% content_for :examples, flush: true do %>
  <div class="w-full flex justify-center">
    <%= render "examples/components/accordion/code/description" %>
  </div>
<% end %>

<% content_for :code, flush: true do %>
  <%= code_partial("accordion/code/_description.html", :erb) %>
<% end %>

<%= render_example %>

<% content_for :examples, flush: true do %>
  <div class="w-full flex justify-center">
    <%= render "examples/components/accordion/code/block" %>
  </div>
<% end %>

<% content_for :code, flush: true do %>
  <%= code_partial("accordion/code/_block.html", :erb) %>
<% end %>

<%= render_example %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shadcn-ui-0.0.3 app/views/examples/components/accordion.html.erb