mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-23 07:56:50 +00:00
some suggested changes
This commit is contained in:
1 parent
00bcbac55e
commit
fbc54f5ab0
5 files changed
+47
-19
No files matched your search
@@ -27,17 +27,17 @@ const Nav = {
|
||||
item : ({ icon, kbd, href, newTab, onClick, children, className, disabled, noDismiss, ...props })=>{
|
||||
const classes = cx('navItem', className);
|
||||
if(disabled) {
|
||||
return <button className={classes} disabled>{children}{icon && <i className={icon}></i>}</button>;
|
||||
return <button className={classes} disabled>{icon && <i className={icon}></i>}{children}</button>;
|
||||
}
|
||||
if(href){
|
||||
return <a className={classes} href={href} target={newTab ? '_blank' : '_self'} {...props}>
|
||||
{children}
|
||||
{icon && <i className={icon}></i>}
|
||||
{children}
|
||||
</a>;
|
||||
} else {
|
||||
return <button {...props} no-dismiss={noDismiss ? 'true' : undefined} className={classes} onClick={onClick} >
|
||||
{children}
|
||||
{icon && <i className={icon}></i>}
|
||||
{children}
|
||||
{kbd && <kbd>{kbd}</kbd>}
|
||||
</button>;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user