Skip to content

Commit

Permalink
Merge pull request #146 from ably/DEX-65-ably-icon-navigation
Browse files Browse the repository at this point in the history
[DEX-65] support optional icon link
  • Loading branch information
j0eyw authored Feb 4, 2022
2 parents 888ee97 + d80a401 commit 7363cd2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/Meganav/component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<%= notice %>

<div class="ui-meganav ui-grid-px">
<%= render(AblyUi::Core::Logo.new(theme_name: @theme_name, data_id: "meganav-logo", href: url_base)) %>
<%= render(AblyUi::Core::Logo.new(theme_name: @theme_name, data_id: "meganav-logo", href: logo_link)) %>
<%= render(AblyUi::Core::MeganavItemsDesktop.new(theme_name: @theme_name, url_base: url_base)) %>

<% if @session_data[:signedIn] %>
Expand Down
4 changes: 3 additions & 1 deletion src/core/Meganav/component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,23 @@ module Core
class Meganav < ViewComponent::Base
include MeganavConfig
include Util
attr_reader :options, :login_link, :url_base
attr_reader :options, :login_link, :logo_link, :url_base

renders_one :notice, AblyUi::Core::Notice

def initialize(
session_data: {},
theme_name: :white,
login_link: '/login',
logo_link: '',
url_base: AblyUi::Core::Util::DEFAULT_URL_BASE
)
@session_data = session_data
@theme_name = theme_name
@options = options
@login_link = login_link
@url_base = url_base
@logo_link = logo_link || url_base
theme_setup(theme_name)
end

Expand Down

0 comments on commit 7363cd2

Please sign in to comment.