Skip to content

Commit 784643d

Browse files
koppenCopilot
andcommitted
Improve documentation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 74fc5aa commit 784643d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

app/components/flowbite/card.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,13 @@ def styles
3131
# (e.g., custom classes, data attributes). These options are merged into
3232
# the card's root element.
3333
#
34-
# @param title [String, nil] An optional title for the card. If provided,
34+
# @param title [Hash] An optional title for the card. If provided,
3535
# it will be rendered at the top of the card in a h5 tag using the
36-
# Card::Title component. Alternatively, you can use the `title` slot to
37-
# provide the entire title element yourself.
36+
# Card::Title component. The hash can contain:
37+
# - `content`: The text content of the title
38+
# - `options`: Additional HTML options to pass to the title element
39+
# Alternatively, you can use the `title` slot to provide the entire
40+
# title element yourself.
3841
def initialize(class: [], options: {}, title: {})
3942
@class = Array(binding.local_variable_get(:class)) || []
4043
@options = options || {}

0 commit comments

Comments
 (0)