Update Next.js configuration and package dependencies
All checks were successful
Deploy / deploy (push) Successful in 9m29s
All checks were successful
Deploy / deploy (push) Successful in 9m29s
- Modified redirects in next.config.ts to change the destination for "/sohbet" to "/listem". - Added new dependencies in package.json: marked, motion, react-markdown, remark-breaks, remark-gfm, shiki, and use-stick-to-bottom. - Updated pnpm-lock.yaml to reflect the new package versions and dependencies. - Removed obsolete stack files for Flutter, Nuxt, Nuxt.js, React Native, and Svelte from the UI/UX Pro Max skill data. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
42
src/components/ui/scroll-button.tsx
Normal file
42
src/components/ui/scroll-button.tsx
Normal file
@@ -0,0 +1,42 @@
|
||||
"use client"
|
||||
|
||||
import { Button, buttonVariants } from "@/components/ui/button"
|
||||
import { cn } from "@/lib/utils"
|
||||
import { type VariantProps } from "class-variance-authority"
|
||||
import { ChevronDown } from "lucide-react"
|
||||
import { useStickToBottomContext } from "use-stick-to-bottom"
|
||||
|
||||
export type ScrollButtonProps = {
|
||||
className?: string
|
||||
variant?: VariantProps<typeof buttonVariants>["variant"]
|
||||
size?: VariantProps<typeof buttonVariants>["size"]
|
||||
} & React.ButtonHTMLAttributes<HTMLButtonElement>
|
||||
|
||||
function ScrollButton({
|
||||
className,
|
||||
variant = "outline",
|
||||
size = "sm",
|
||||
...props
|
||||
}: ScrollButtonProps) {
|
||||
const { isAtBottom, scrollToBottom } = useStickToBottomContext()
|
||||
|
||||
return (
|
||||
<Button
|
||||
variant={variant}
|
||||
size={size}
|
||||
className={cn(
|
||||
"h-10 w-10 rounded-full transition-all duration-150 ease-out",
|
||||
!isAtBottom
|
||||
? "translate-y-0 scale-100 opacity-100"
|
||||
: "pointer-events-none translate-y-4 scale-95 opacity-0",
|
||||
className
|
||||
)}
|
||||
onClick={() => scrollToBottom()}
|
||||
{...props}
|
||||
>
|
||||
<ChevronDown className="h-5 w-5" />
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
|
||||
export { ScrollButton }
|
||||
Reference in New Issue
Block a user