Class: Irelia::Sidebar::Navigation::Link::Preview

Inherits:
ComponentPreview
  • Object
show all
Defined in:
app/components/irelia/sidebar/navigation/link/preview.rb

Instance Method Summary collapse

Instance Method Details

#defaultObject

You can specify the container class for the default template self.container_class = “w-1/2 border border-gray-300”



7
8
9
# File 'app/components/irelia/sidebar/navigation/link/preview.rb', line 7

def default
  render(Irelia::Sidebar::Navigation::Link::Component.new(icon: "fa fa-dashboard", url: "#")) { "Dashboard" }
end

#post_requestObject



11
12
13
# File 'app/components/irelia/sidebar/navigation/link/preview.rb', line 11

def post_request
  render(Irelia::Sidebar::Navigation::Link::Component.new(icon: "fa fa-right-from-bracket", url: "#", method: :delete)) { "Sign out" }
end