import React from 'react';
import { Link } from 'react-router';

function NavbarLink({to, href, className, component, children}) {
  const Comp = component || Link;

  return (
    <span>
      { href ?
        <a href={href}>Yo</a>
        :
        <Comp to={to} className={className} activeStyle={{
          color: '#A94545',
        }}>
          {children}
        </Comp>
      }
    </span>
  );
}


export default NavbarLink;

@@ -83,16 +83,17 @@
 nk(%7B
-to, href
+ children
 , cl
@@ -112,24 +112,25 @@
 ponent, 
-children
+href, to 
 %7D) %7B%0A  c
@@ -167,87 +167,28 @@
 %0A%0A  
-return (%0A    %3Cspan%3E%0A      %7B href ?%0A        %3Ca href=%7Bhref%7D%3EYo%3C/a%3E%0A        :%0A    
+let Linkelement = (%0A
     
@@ -244,20 +244,16 @@
 %7B%0A      
-    
 color: '
@@ -270,20 +270,12 @@
     
-    %7D%7D%3E%0A    
+%7D%7D%3E%0A
     
@@ -287,20 +287,16 @@
 ildren%7D%0A
-    
     %3C/Co
@@ -305,29 +305,129 @@
 %3E%0A  
-    %7D%0A    %3C/span%3E%0A  )
+);%0A  if (href) %7B%0A    Linkelement = (%0A      %3Ca href=%7Bhref%7D%3E%0A        %7Bchildren%7D%0A      %3C/a%3E%0A    );%0A  %7D%0A%0A  return Linkelement
 ;%0A%7D%0A

Modify link generation to allow off site links