refactor: rewrite Button on the local Primitive utility

Drops the reka-ui Primitive import; behavior and classes are unchanged.
This commit is contained in:
Matthew McPeak 2026-07-13 18:11:58 -04:00
parent 7fe65bd3ed
commit 2341ceebe0

View file

@ -1,14 +1,15 @@
<script setup lang="ts"> <script setup lang="ts">
import type { PrimitiveProps } from 'reka-ui'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import type { ButtonVariants } from '.' import type { ButtonVariants } from '.'
import { computed } from 'vue' import { computed } from 'vue'
import { Primitive } from 'reka-ui' import { Primitive } from '@/lib/primitive'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
import NychLoadingIcon from '@/components/NychLoadingIcon.vue' import NychLoadingIcon from '@/components/NychLoadingIcon.vue'
import { buttonVariants } from '.' import { buttonVariants } from '.'
interface Props extends PrimitiveProps { interface Props {
as?: string
asChild?: boolean
variant?: ButtonVariants['variant'] variant?: ButtonVariants['variant']
size?: ButtonVariants['size'] size?: ButtonVariants['size']
class?: HTMLAttributes['class'] class?: HTMLAttributes['class']