refactor: replace button elements with Button component

This commit is contained in:
Anish Sarkar 2026-05-14 14:46:48 +05:30
parent da55c75e5e
commit 13b2e874f6
7 changed files with 38 additions and 16 deletions

View file

@ -12,6 +12,8 @@ Preload heavy bundles before they're needed to reduce perceived latency.
**Example (preload on hover/focus):**
```tsx
import { Button } from "@/components/ui/button"
function EditorButton({ onClick }: { onClick: () => void }) {
const preload = () => {
if (typeof window !== 'undefined') {
@ -20,13 +22,13 @@ function EditorButton({ onClick }: { onClick: () => void }) {
}
return (
<button
<Button
onMouseEnter={preload}
onFocus={preload}
onClick={onClick}
>
Open Editor
</button>
</Button>
)
}
```