forked from folio-org/stripes-components
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNavList.js
More file actions
33 lines (28 loc) · 755 Bytes
/
Copy pathNavList.js
File metadata and controls
33 lines (28 loc) · 755 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
* Nav List
*/
import React, { forwardRef } from 'react';
import classnames from 'classnames';
import PropTypes from 'prop-types';
import navListSectionCss from '../NavListSection/NavListSection.css';
const NavList = forwardRef(({ className, children, ariaLabel, ...rest }, ref) => (
<nav
data-test-nav-list
ref={ref}
className={classnames(navListSectionCss.navListSectionControl, className)}
aria-label={rest['aria-label'] || ariaLabel}
{...rest}
>
{children}
</nav>
));
NavList.propTypes = {
ariaLabel: PropTypes.string,
children: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.node),
PropTypes.node,
]),
className: PropTypes.string,
};
NavList.displayName = 'NavList';
export default NavList;