feat: Add code download functionality
Adds a new "Download Code" button to the code block component, allowing users to download the code displayed for offline use. This feature enhances user convenience and provides a more versatile experience for exploring and utilizing code snippets.
This commit is contained in:
@@ -61,10 +61,10 @@ export const PlaygroundChat = () => {
|
||||
)}
|
||||
</div>
|
||||
{!isAtBottom && (
|
||||
<div className="fixed md:bottom-40 bottom-36 z-20 left-0 right-0 flex justify-center">
|
||||
<div className="fixed bottom-36 z-20 left-0 right-0 flex justify-center">
|
||||
<button
|
||||
onClick={scrollToBottom}
|
||||
className="bg-gray-100 border dark:border-gray-700 dark:bg-gray-800 p-1 rounded-full shadow-md hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200">
|
||||
className="bg-white border border-gray-100 dark:border-none dark:bg-white/20 p-1.5 rounded-full pointer-events-auto">
|
||||
<ChevronDown className="size-4 text-gray-600 dark:text-gray-300" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user