Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 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 | 32x 32x 32x 32x 32x 3x 3x 3x 6x 3x 3x 32x 32x | import * as classNames from 'classnames';
import * as React from 'react';
import { HTMLProps, PureComponent } from 'react';
import { ComponentProps } from '../../types';
export interface NavProps extends ComponentProps, HTMLProps<HTMLElement> {}
/**
* Used to group NavItems inside a NavBar or SideBar.
* You should use the atomic display classes e.g. `"display-none md-display-block"`
* to hide the nav and replace it with a menu button (for controlling the SideBar) on smaller screens.
* The same Nav can be used in both a NavBar and SideBar, and will automatically style itself sensibly.
*/
export class Nav extends PureComponent<NavProps, {}> {
public render() {
const {
className,
children,
component: Component = 'ul',
...remainingProps
} = this.props;
return (
<Component {...remainingProps} className={classNames('nav', className)}>
{children}
</Component>
);
}
}
export default Nav;
|