Commit 2a00d8ea authored by David O'Regan's avatar David O'Regan

Merge branch 'make-gl-tabs-nav-follow-theme' into 'master'

Remove redundant theme class for gl_tabs_nav

See merge request gitlab-org/gitlab!79649
parents 60af5d34 70953a15
export const ACTIVE_TAB_CLASSES = Object.freeze([ export const ACTIVE_TAB_CLASSES = Object.freeze(['active', 'gl-tab-nav-item-active']);
'active',
'gl-tab-nav-item-active',
'gl-tab-nav-item-active-indigo',
]);
export const ACTIVE_PANEL_CLASS = 'active'; export const ACTIVE_PANEL_CLASS = 'active';
......
...@@ -33,7 +33,7 @@ module TabHelper ...@@ -33,7 +33,7 @@ module TabHelper
# #
def gl_tab_link_to(name = nil, options = {}, html_options = {}, &block) def gl_tab_link_to(name = nil, options = {}, html_options = {}, &block)
link_classes = %w[nav-link gl-tab-nav-item] link_classes = %w[nav-link gl-tab-nav-item]
active_link_classes = %w[active gl-tab-nav-item-active gl-tab-nav-item-active-indigo] active_link_classes = %w[active gl-tab-nav-item-active]
if block_given? if block_given?
# Shift params to skip the omitted "name" param # Shift params to skip the omitted "name" param
......
...@@ -45,7 +45,7 @@ RSpec.describe TabHelper do ...@@ -45,7 +45,7 @@ RSpec.describe TabHelper do
end end
it 'creates an active tab with item_active = true' do it 'creates an active tab with item_active = true' do
expect(helper.gl_tab_link_to('Link', '/url', { item_active: true })).to match(/<a class=".*active gl-tab-nav-item-active gl-tab-nav-item-active-indigo.*"/) expect(helper.gl_tab_link_to('Link', '/url', { item_active: true })).to match(/<a class=".*active gl-tab-nav-item-active.*"/)
end end
context 'when on the active page' do context 'when on the active page' do
...@@ -54,7 +54,7 @@ RSpec.describe TabHelper do ...@@ -54,7 +54,7 @@ RSpec.describe TabHelper do
end end
it 'creates an active tab' do it 'creates an active tab' do
expect(helper.gl_tab_link_to('Link', '/url')).to match(/<a class=".*active gl-tab-nav-item-active gl-tab-nav-item-active-indigo.*"/) expect(helper.gl_tab_link_to('Link', '/url')).to match(/<a class=".*active gl-tab-nav-item-active.*"/)
end end
it 'creates an inactive tab with item_active = false' do it 'creates an inactive tab with item_active = false' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment