app/components/primer/truncate.rb in openproject-primer_view_components-0.6.3 vs app/components/primer/truncate.rb in openproject-primer_view_components-0.7.0
- old
+ new
@@ -6,28 +6,9 @@
status :deprecated
DEFAULT_TAG = :div
TAG_OPTIONS = [DEFAULT_TAG, :span, :p, :strong].freeze
- # @example Default
- # <div class="col-2">
- # <%= render(Primer::Truncate.new(tag: :p)) { "branch-name-that-is-really-long" } %>
- # </div>
- #
- # @example Inline
- # <%= render(Primer::Truncate.new(tag: :span, inline: true)) { "branch-name-that-is-really-long" } %>
- #
- # @example Expandable
- # <%= render(Primer::Truncate.new(tag: :span, inline: true, expandable: true)) { "branch-name-that-is-really-long" } %>
- #
- # @example Custom size
- # <%= render(Primer::Truncate.new(tag: :span, inline: true, expandable: true, max_width: 100)) { "branch-name-that-is-really-long" } %>
- #
- # @example With HTML content
- # <%= render(Primer::Truncate.new(tag: :span, inline: true, expandable: true, max_width: 100)) do %>
- # <span>branch-name-that-is-really-long</span>
- # <% end %>
- #
# @param tag [Symbol] <%= one_of(Primer::Truncate::TAG_OPTIONS) %>
# @param inline [Boolean] Whether the element is inline (or inline-block).
# @param expandable [Boolean] Whether the entire string should be revealed on hover. Can only be used in conjunction with `inline`.
# @param max_width [Integer] Sets the max-width of the text.
# @param system_arguments [Hash] <%= link_to_system_arguments_docs %>