Spaces:
Sleeping
Sleeping
Download src/components/Logo.jsx from randome-games/proxy: direct link, hf CLI and curl.
- Browser
- Download file 959 Bytes
-
https://huggingface.co/spaces/randome-games/proxy/resolve/main/src/components/Logo.jsx
- Command line
-
hf download hf://spaces/randome-games/proxy/src/components/Logo.jsx
-
curl -L -o Logo.jsx https://huggingface.co/spaces/randome-games/proxy/resolve/main/src/components/Logo.jsx
959 Bytes
| import clsx from 'clsx'; | |
| import { useOptions } from '/src/utils/optionsContext'; | |
| import { memo, useMemo } from 'react'; | |
| const Logo = memo(({ options, action, width, height }) => { | |
| const { options: op } = useOptions(); | |
| const style = useMemo(() => { | |
| const lightAdj = op.type === 'light' ? { filter: 'invert(80%)' } : {}; | |
| const dimensions = { | |
| ...(width && { width }), | |
| ...(height && { height }), | |
| }; | |
| return { ...lightAdj, ...dimensions }; | |
| }, [op.type, width, height]); | |
| const className = useMemo( | |
| () => | |
| clsx( | |
| options, | |
| action && 'cursor-pointer duration-300 ease-out scale-[1.12] hover:scale-[1.15]', | |
| 'select-none', | |
| ), | |
| [options, action], | |
| ); | |
| return ( | |
| <img | |
| src="/logo.svg" | |
| className={className} | |
| id="btn-logo" | |
| draggable="false" | |
| alt="logo" | |
| onClick={action} | |
| style={style} | |
| /> | |
| ); | |
| }); | |
| Logo.displayName = 'Logo'; | |
| export default Logo; | |