Sha256: b7b39da8fc2a6ff0611f3be2df3eee6136398ccfc69f11233bdb809fb93476f9
Contents?: true
Size: 709 Bytes
Versions: 4
Compression:
Stored size: 709 Bytes
Contents
import React, { Component } from "react"; import PropTypes from "prop-types"; const propTypes = { text: PropTypes.string.isRequired, link: PropTypes.string, active: PropTypes.bool }; const defaultProps = { text: "Hello Item", link: "#", active: false }; class NavItem extends Component { render() { const { text, link, active } = this.props; return ( <li className={"pb_nav_list_border_item" + active}> <a className="pb_nav_list_item_link" href={link} > <span className="pb_nav_list_item_text">{text}</span> </a> </li> ); } } NavItem.propTypes = propTypes; NavItem.defaultProps = defaultProps; export default NavItem;
Version data entries
4 entries across 4 versions & 1 rubygems