import PropTypes from 'prop-types';
import { LinkContainer } from 'react-router-bootstrap';
import Button from 'react-bootstrap-button-loader';

function NavButton(props) {
  const { to, content, ...otherProps } = props;
  return (
    <LinkContainer to={to}>
      <Button {...otherProps}>{content}</Button>
    </LinkContainer>
  );
}

NavButton.propTypes = {
  to: PropTypes.string.isRequired,
  content: PropTypes.string
};

export default NavButton;
