start
This commit is contained in:
19
src/components/shared/nav-link.js
Normal file
19
src/components/shared/nav-link.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import { LinkContainer } from 'react-router-bootstrap';
|
||||
import Nav from 'react-bootstrap/Nav';
|
||||
|
||||
function NavLink(props) {
|
||||
const { to, content, ...otherProps } = props;
|
||||
return (
|
||||
<LinkContainer to={to}>
|
||||
<Nav.Link {...otherProps}>{content}</Nav.Link>
|
||||
</LinkContainer>
|
||||
);
|
||||
}
|
||||
|
||||
NavLink.propTypes = {
|
||||
to: PropTypes.string.isRequired,
|
||||
content: PropTypes.string
|
||||
};
|
||||
|
||||
export default NavLink;
|
||||
Reference in New Issue
Block a user