diff --git a/components/doc/menu/pt/wireframe.js b/components/doc/menu/pt/wireframe.js index 54aafd2e3e..65aec2f3f2 100644 --- a/components/doc/menu/pt/wireframe.js +++ b/components/doc/menu/pt/wireframe.js @@ -1,9 +1,7 @@ - import React from 'react'; import { DocSectionText } from '../../common/docsectiontext'; export const Wireframe = (props) => { - return ( <> diff --git a/components/lib/menu/Menu.js b/components/lib/menu/Menu.js index d52a935df6..a76fb98b6b 100644 --- a/components/lib/menu/Menu.js +++ b/components/lib/menu/Menu.js @@ -161,16 +161,14 @@ export const Menu = React.memo( { className, style: submenu.style, - role: "presentation" + role: 'presentation' }, ptm('submenuHeader') ); return ( -
  • - {submenu.label} -
  • +
  • {submenu.label}
  • {items}
    ); @@ -181,11 +179,11 @@ export const Menu = React.memo( const separatorProps = mergeProps( { key, - className: "p-menu-separator", - role: "separator" + className: 'p-menu-separator', + role: 'separator' }, ptm('separator') - ) + ); return
  • ; }; @@ -207,7 +205,7 @@ export const Menu = React.memo( const icon = IconUtils.getJSXIcon(item.icon, { ...iconProps }, { props }); const labelProps = mergeProps( { - className: "p-menuitem-text" + className: 'p-menuitem-text' }, ptm('label') ); @@ -218,12 +216,12 @@ export const Menu = React.memo( { href: item.url || '#', className: linkClassName, - role: "menuitem", + role: 'menuitem', target: item.target, onClick: (event) => onItemClick(event, item), onKeyDown: (event) => onItemKeyDown(event, item), tabIndex: tabIndex, - 'aria-disabled': item.disabled, + 'aria-disabled': item.disabled }, ptm('action') ); @@ -255,16 +253,12 @@ export const Menu = React.memo( key, className, style: item.style, - role: "none" + role: 'none' }, ptm('menuitem') ); - return ( -
  • - {content} -
  • - ); + return
  • {content}
  • ; }; const createItem = (item, index) => { @@ -301,8 +295,8 @@ export const Menu = React.memo( const menuProps = mergeProps( { - className: "p-menu-list p-reset", - role: "menu" + className: 'p-menu-list p-reset', + role: 'menu' }, ptm('menu') ); @@ -321,9 +315,7 @@ export const Menu = React.memo( onExited={onExited} >
    - +
    ); diff --git a/pages/menu/index.js b/pages/menu/index.js index e2a11e8b42..e5fc47876c 100644 --- a/pages/menu/index.js +++ b/pages/menu/index.js @@ -48,24 +48,23 @@ const MenuDemo = () => { component: AccessibilityDoc } ]; -const ptDocs = [ - { - id: 'pt.wireframe', - label: 'Wireframe', - component: Wireframe - }, - { - id: 'pt.menu.options', - label: 'Menu PT Options', - component: DocApiTable - }, - { - id: 'pt.demo', - label: 'Example', - component: PTDoc - } -]; - + const ptDocs = [ + { + id: 'pt.wireframe', + label: 'Wireframe', + component: Wireframe + }, + { + id: 'pt.menu.options', + label: 'Menu PT Options', + component: DocApiTable + }, + { + id: 'pt.demo', + label: 'Example', + component: PTDoc + } + ]; return ; };