mirror of
https://github.com/hanzonet/explore.git
synced 2026-10-30 18:16:57 +00:00
* add ENV for navigation layout type * add network menu to top bar * renaming and main component placeholder * add logo, testnet badge, login and connect wallet buttons to the nav bar * refactor once more * styles for nav link group * style nav link * style groupped nav links * update values for L2 review * update demo values * fix deployment values for L2 review * tests * fix prop collision * shorten filter input on marketplace page and update MainArea height * change margin between text and lightning label * add active state to "Other" nav menu * popover fixes * fix link width * [skip ci] update demo values
26 lines
678 B
TypeScript
26 lines
678 B
TypeScript
import { chakra } from '@chakra-ui/react';
|
|
import React from 'react';
|
|
|
|
import type { NavItem, NavGroupItem } from 'types/client/navigation';
|
|
|
|
import IconSvg from 'ui/shared/IconSvg';
|
|
|
|
interface Props {
|
|
className?: string;
|
|
item: NavItem | NavGroupItem;
|
|
}
|
|
|
|
const NavLinkIcon = ({ item, className }: Props) => {
|
|
if ('icon' in item && item.icon) {
|
|
return <IconSvg className={ className } name={ item.icon } boxSize="30px" flexShrink={ 0 }/>;
|
|
}
|
|
if ('iconComponent' in item && item.iconComponent) {
|
|
const IconComponent = item.iconComponent;
|
|
return <IconComponent className={ className } size={ 30 }/>;
|
|
}
|
|
|
|
return null;
|
|
};
|
|
|
|
export default chakra(NavLinkIcon);
|