import React from 'react'; type Props = { icon?: string; label: string; action: () => void; }; class NavAction extends React.Component { render() { const { label, icon, action } = this.props; let showIcon = null; if (icon) { showIcon = ( <> {' '} ); } return (
  • {showIcon} {label}
  • ); } } export default NavAction;