Class: NfgUi::Components::Foundations::Image
- Inherits:
-
Base
- Object
- Bootstrap::Components::Base
- Base
- NfgUi::Components::Foundations::Image
- Includes:
- Bootstrap::Utilities::Responsiveable, Bootstrap::Utilities::Tooltipable, Traits::Responsive
- Defined in:
- lib/nfg_ui/components/foundations/image.rb
Overview
Image doc coming soon
Direct Known Subclasses
Constant Summary
Constants included from Traits::Responsive
Constants included from Traits
Traits::REGISTERED_TRAITS, Traits::TRAIT_MODULES
Instance Attribute Summary
Attributes included from Bootstrap::Utilities::Disableable
Attributes inherited from Bootstrap::Components::Base
#body, #options, #view_context
Instance Method Summary collapse
-
#image ⇒ Object
Prefer image, image is used on other components that pull in the image (e.g. Illustration).
- #render ⇒ Object
-
#src ⇒ Object
Allow :src to come through since :src is a native and viable to way source a image path / url.
Methods included from Traits::Responsive
Methods included from Bootstrap::Utilities::Responsiveable
Methods included from Bootstrap::Utilities::Tooltipable
#data, #disabled_component_tooltip_wrapper_html_options, #html_options, #tooltip
Methods included from Bootstrap::Utilities::Disableable
Methods included from Utilities::Traitable
Methods included from Utilities::Renderable
Methods included from Utilities::Describable
Methods inherited from Bootstrap::Components::Base
#component_family, #data, #href, #html_options, #id, #initialize, #style
Constructor Details
This class inherits a constructor from NfgUi::Bootstrap::Components::Base
Instance Method Details
#image ⇒ Object
Prefer image, image is used on other components that pull in the image (e.g. Illustration)
15 16 17 |
# File 'lib/nfg_ui/components/foundations/image.rb', line 15 def image .fetch(:image, nil) end |
#render ⇒ Object
19 20 21 |
# File 'lib/nfg_ui/components/foundations/image.rb', line 19 def render image_tag(view_context.image_path(image_location), **) end |
#src ⇒ Object
Allow :src to come through since :src is a native and viable to way source a image path / url
26 27 28 |
# File 'lib/nfg_ui/components/foundations/image.rb', line 26 def src .fetch(:src, image) end |