diff --git a/playbook/app/pb_kits/playbook/pb_list/list.rb b/playbook/app/pb_kits/playbook/pb_list/list.rb index 7b5f247b44..d1dd2fd128 100755 --- a/playbook/app/pb_kits/playbook/pb_list/list.rb +++ b/playbook/app/pb_kits/playbook/pb_list/list.rb @@ -19,14 +19,12 @@ class List < Playbook::KitBase prop :tabindex def list_classname - [ - "pb_list_kit", - xpadding_class, - borderless_class, - dark_class, - size_class, - layout_class, - ].compact.join("_") + generate_classname("pb_list_kit", + xpadding_class, + borderless_class, + dark_class, + size_class, + layout_class) end def ordered_class diff --git a/playbook/spec/pb_kits/playbook/kits/list_spec.rb b/playbook/spec/pb_kits/playbook/kits/list_spec.rb index 7f98813a4f..831debb6d8 100644 --- a/playbook/spec/pb_kits/playbook/kits/list_spec.rb +++ b/playbook/spec/pb_kits/playbook/kits/list_spec.rb @@ -31,12 +31,12 @@ describe "#classname" do it "returns namespaced class name", :aggregate_failures do expect(subject.new({}).list_classname).to eq "pb_list_kit_" - expect(subject.new(dark: true).list_classname).to eq "pb_list_kit_dark_" + expect(subject.new(dark: true).list_classname).to eq "pb_list_kit_dark_ dark" expect(subject.new(borderless: true).list_classname).to eq "pb_list_kit_borderless_" expect(subject.new(xpadding: true).list_classname).to eq "pb_list_kit_xpadding_" expect(subject.new(size: "large").list_classname).to eq "pb_list_kit_large_" expect(subject.new(layout: "right").list_classname).to eq "pb_list_kit_layout_right" - expect(subject.new(dark: true, xpadding: true, size: "large", borderless: true, layout: "left").list_classname).to eq "pb_list_kit_xpadding_borderless_dark_large_layout_left" + expect(subject.new(dark: true, xpadding: true, size: "large", borderless: true, layout: "left").list_classname).to eq "pb_list_kit_xpadding_borderless_dark_large_layout_left dark" end end end