Class: ShadcnPhlexcomponents::Card

Inherits:
Base
  • Object
show all
Defined in:
lib/shadcn_phlexcomponents/components/card.rb

Constant Summary

Constants inherited from Base

Base::SANITIZER_ALLOWED_ATTRIBUTES, Base::SANITIZER_ALLOWED_TAGS, Base::TAILWIND_MERGER

Instance Method Summary collapse

Methods inherited from Base

#before_template, #convert_collection_hash_to_struct, #default_attributes, #find_as_child, #icon, #initialize, #item_disabled?, #merge_default_attributes, #merged_as_child_attributes, #nokogiri_attributes_to_hash, #overlay, #sanitize_as_child

Constructor Details

This class inherits a constructor from ShadcnPhlexcomponents::Base

Instance Method Details

#action(**attributes) ⇒ Object



26
27
28
# File 'lib/shadcn_phlexcomponents/components/card.rb', line 26

def action(**attributes, &)
  CardAction(**attributes, &)
end

#content(**attributes) ⇒ Object



30
31
32
# File 'lib/shadcn_phlexcomponents/components/card.rb', line 30

def content(**attributes, &)
  CardContent(**attributes, &)
end

#description(**attributes) ⇒ Object



22
23
24
# File 'lib/shadcn_phlexcomponents/components/card.rb', line 22

def description(**attributes, &)
  CardDescription(**attributes, &)
end


34
35
36
# File 'lib/shadcn_phlexcomponents/components/card.rb', line 34

def footer(**attributes, &)
  CardFooter(**attributes, &)
end

#header(**attributes) ⇒ Object



14
15
16
# File 'lib/shadcn_phlexcomponents/components/card.rb', line 14

def header(**attributes, &)
  CardHeader(**attributes, &)
end

#title(**attributes) ⇒ Object



18
19
20
# File 'lib/shadcn_phlexcomponents/components/card.rb', line 18

def title(**attributes, &)
  CardTitle(**attributes, &)
end

#view_template ⇒ Object



38
39
40
# File 'lib/shadcn_phlexcomponents/components/card.rb', line 38

def view_template(&)
  div(**@attributes, &)
end