Hey is a decentralized and permissionless social media app built with Lens Protocol 馃尶
at main 44 lines 1.0 kB view raw
1import { STATIC_IMAGES_URL } from "@hey/data/constants"; 2import { type MouseEvent, useCallback } from "react"; 3import { Button } from "@/components/Shared/UI"; 4import { useAuthModalStore } from "@/store/non-persisted/modal/useAuthModalStore"; 5 6interface LoginButtonProps { 7 className?: string; 8 isBig?: boolean; 9 title?: string; 10} 11 12const LoginButton = ({ 13 className = "", 14 isBig = false, 15 title = "Login" 16}: LoginButtonProps) => { 17 const { setShowAuthModal } = useAuthModalStore(); 18 19 const handleClick = useCallback((event: MouseEvent<HTMLButtonElement>) => { 20 event.stopPropagation(); 21 return setShowAuthModal(true); 22 }, []); 23 24 return ( 25 <Button 26 className={className} 27 icon={ 28 <img 29 alt="Lens Logo" 30 className="mr-0.5 h-3" 31 height={12} 32 src={`${STATIC_IMAGES_URL}/brands/lens.svg`} 33 width={19} 34 /> 35 } 36 onClick={handleClick} 37 size={isBig ? "lg" : "md"} 38 > 39 {title} 40 </Button> 41 ); 42}; 43 44export default LoginButton;