diff --git a/playbook/app/pb_kits/playbook/pb_dropdown/_dropdown.scss b/playbook/app/pb_kits/playbook/pb_dropdown/_dropdown.scss index 05b26b4b07..f769bd112a 100644 --- a/playbook/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +++ b/playbook/app/pb_kits/playbook/pb_dropdown/_dropdown.scss @@ -9,7 +9,7 @@ @import "./scss_partials/dropdown_animation"; -.pb_dropdown { +[class*="pb_dropdown"] { .dropdown_wrapper { [class*="dropdown_trigger_wrapper"] { @include pb_body; @@ -131,7 +131,7 @@ } } - &.separators_hidden { + &[class*="separators_hidden"] { .dropdown_wrapper { .pb_dropdown_container { @@ -142,7 +142,7 @@ } } - &.subtle { + &[class*="subtle"] { .dropdown_wrapper { .pb_dropdown_container { @@ -178,7 +178,7 @@ } } - &.separators_hidden { + &[class*="separators_hidden"] { .dropdown_wrapper { .pb_dropdown_container { [class*="pb_dropdown_option"]:first-child { diff --git a/playbook/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx b/playbook/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx index 28af6eb76a..13af9cb3c5 100644 --- a/playbook/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +++ b/playbook/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx @@ -74,10 +74,8 @@ const Dropdown = forwardRef((props: DropdownProps, ref: any) => { const htmlProps = buildHtmlProps(htmlOptions); const separatorsClass = separators ? '' : 'separators_hidden' const classes = classnames( - buildCss("pb_dropdown"), + buildCss("pb_dropdown", variant, separatorsClass), globalProps(props), - variant, - separatorsClass, className ); diff --git a/playbook/app/pb_kits/playbook/pb_dropdown/dropdown.rb b/playbook/app/pb_kits/playbook/pb_dropdown/dropdown.rb index 30e6cbd2f5..422e7824e2 100644 --- a/playbook/app/pb_kits/playbook/pb_dropdown/dropdown.rb +++ b/playbook/app/pb_kits/playbook/pb_dropdown/dropdown.rb @@ -24,7 +24,7 @@ def data end def classname - generate_classname("pb_dropdown", variant, separators_class, separator: " ") + generate_classname("pb_dropdown", variant, separators_class) end private @@ -38,7 +38,7 @@ def input_default_value end def separators_class - separators ? "" : "separators_hidden" + separators ? nil : "separators_hidden" end def options_with_blank