this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

remove code button

-56
-56
src/components/console/code-button.tsx
··· 1 - import { cn } from "~/lib/utils"; 2 - import type { ReactNode } from "react"; 3 - 4 - interface CodeButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> { 5 - children: ReactNode; 6 - active?: boolean; 7 - } 8 - 9 - /** 10 - * Button styled for the console aesthetic. 11 - * 12 - * Uses monospace font, hairline border, and amber accent on hover/active. 13 - * Designed for pagination controls and technical actions. 14 - * 15 - * @example 16 - * <CodeButton onClick={prevPage}> 17 - * <span>&lt;</span> 18 - * <span>prev</span> 19 - * </CodeButton> 20 - * 21 - * <CodeButton active>Page 1</CodeButton> 22 - */ 23 - export function CodeButton({ 24 - children, 25 - className, 26 - active = false, 27 - disabled, 28 - ...props 29 - }: CodeButtonProps) { 30 - return ( 31 - <button 32 - className={cn( 33 - "inline-flex items-center gap-2", 34 - "px-3 py-2", 35 - "border border-(--border-default)", 36 - "bg-(--bg-secondary)", 37 - "font-mono text-sm", 38 - "text-(--text-primary)", 39 - "transition-all duration-fast ease-default", 40 - "hover:border-(--accent-default) hover:bg-(--accent-subtle)", 41 - active && [ 42 - "bg-(--accent-default)", 43 - "border-(--accent-default)", 44 - "text-(--text-inverse)", 45 - "font-medium", 46 - ], 47 - disabled && "opacity-50 cursor-not-allowed pointer-events-none", 48 - className, 49 - )} 50 - disabled={disabled} 51 - {...props} 52 - > 53 - {children} 54 - </button> 55 - ); 56 - }