|
|
@ -12,6 +12,7 @@ export default class LocalSettingsPage extends React.PureComponent { |
|
|
|
className: PropTypes.string, |
|
|
|
className: PropTypes.string, |
|
|
|
href: PropTypes.string, |
|
|
|
href: PropTypes.string, |
|
|
|
icon: PropTypes.string, |
|
|
|
icon: PropTypes.string, |
|
|
|
|
|
|
|
textIcon: PropTypes.string, |
|
|
|
index: PropTypes.number.isRequired, |
|
|
|
index: PropTypes.number.isRequired, |
|
|
|
onNavigate: PropTypes.func, |
|
|
|
onNavigate: PropTypes.func, |
|
|
|
title: PropTypes.string, |
|
|
|
title: PropTypes.string, |
|
|
@ -32,6 +33,7 @@ export default class LocalSettingsPage extends React.PureComponent { |
|
|
|
className, |
|
|
|
className, |
|
|
|
href, |
|
|
|
href, |
|
|
|
icon, |
|
|
|
icon, |
|
|
|
|
|
|
|
textIcon, |
|
|
|
onNavigate, |
|
|
|
onNavigate, |
|
|
|
title, |
|
|
|
title, |
|
|
|
} = this.props; |
|
|
|
} = this.props; |
|
|
@ -40,14 +42,14 @@ export default class LocalSettingsPage extends React.PureComponent { |
|
|
|
active, |
|
|
|
active, |
|
|
|
}, className); |
|
|
|
}, className); |
|
|
|
|
|
|
|
|
|
|
|
const iconElem = icon ? <i className={`fa fa-fw fa-${icon}`} /> : null; |
|
|
|
const iconElem = icon ? <i className={`fa fa-fw fa-${icon}`} /> : (textIcon ? <span className='text-icon-button'>{textIcon}</span> : null); |
|
|
|
|
|
|
|
|
|
|
|
if (href) return ( |
|
|
|
if (href) return ( |
|
|
|
<a |
|
|
|
<a |
|
|
|
href={href} |
|
|
|
href={href} |
|
|
|
className={finalClassName} |
|
|
|
className={finalClassName} |
|
|
|
> |
|
|
|
> |
|
|
|
{iconElem} {title} |
|
|
|
{iconElem} <span>{title}</span> |
|
|
|
</a> |
|
|
|
</a> |
|
|
|
); |
|
|
|
); |
|
|
|
else if (onNavigate) return ( |
|
|
|
else if (onNavigate) return ( |
|
|
@ -57,7 +59,7 @@ export default class LocalSettingsPage extends React.PureComponent { |
|
|
|
tabIndex='0' |
|
|
|
tabIndex='0' |
|
|
|
className={finalClassName} |
|
|
|
className={finalClassName} |
|
|
|
> |
|
|
|
> |
|
|
|
{iconElem} {title} |
|
|
|
{iconElem} <span>{title}</span> |
|
|
|
</a> |
|
|
|
</a> |
|
|
|
); |
|
|
|
); |
|
|
|
else return null; |
|
|
|
else return null; |
|
|
|