Module: BetterUi::General::Components::Avatar::AvatarHelper

Included in:
Application::Navbar::Component, Application::Sidebar::Component, BetterUi::General::Components::Avatar
Defined in:
app/helpers/better_ui/general/components/avatar/avatar_helper.rb

Instance Method Summary collapse

Instance Method Details

#bui_avatar(**options) ⇒ String

Render un avatar con le opzioni specificate

Parameters:

  • options (Hash)

    opzioni per il componente

Options Hash (**options):

  • :name (String) — default: nil

    nome per le iniziali

  • :src (String) — default: nil

    URL dell’immagine

  • :size (Symbol) — default: :medium

    :xxsmall, :xsmall, :small, :medium, :large, :xlarge, :xxlarge

  • :shape (Symbol) — default: :circle

    :circle, :square, :rounded

  • :status (Symbol) — default: nil

    :online, :offline, :busy, :away

  • :status_position (Symbol) — default: :bottom_right

    :bottom_right, :bottom_left, :top_right, :top_left

  • :theme (Symbol) — default: :white

    :default, :white, :red, :rose, :orange, :green, :blue, :yellow, :violet

  • :style (Symbol) — default: :filled

    :filled, :outline, :light

  • :classes (String) — default: nil

    classi CSS aggiuntive

  • :id (String) — default: nil

    ID HTML

Returns:

  • (String)

    HTML del componente



22
23
24
# File 'app/helpers/better_ui/general/components/avatar/avatar_helper.rb', line 22

def bui_avatar(**options)
  render BetterUi::General::Avatar::Component.new(**options)
end