Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove duplicate hardcoded classnames(already added by context connexct)
  • Loading branch information
ciampo committed Jun 7, 2023
commit af98989a6008f421d6bfb8e46bcae717a42e408a
2 changes: 1 addition & 1 deletion packages/components/src/dropdown-menu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function UnconnectedDropdownMenu( dropdownMenuProps: DropdownMenuProps ) {

return (
<Dropdown
className={ classnames( 'components-dropdown-menu', className ) }
className={ className }
Copy link
Contributor Author

@ciampo ciampo Jun 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The context system automatically generates a components-* classname based on which namespace is passed in the useContextSystem hook — therefore making the components-dropdown-menu hardcoded classname unnecessary, since duplicated.

The same change was applied to the Dropdown component

popoverProps={ mergedPopoverProps }
renderToggle={ ( { isOpen, onToggle } ) => {
const openOnArrowDown = ( event: React.KeyboardEvent ) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/dropdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const UnconnectedDropdown = (

return (
<div
className={ classnames( 'components-dropdown', className ) }
className={ className }
ref={ useMergeRefs( [
containerRef,
forwardedRef,
Expand Down