Skip to content

Instantly share code, notes, and snippets.

@mrleblanc101
Last active February 2, 2025 01:31
Show Gist options
  • Save mrleblanc101/9588416210634dd5feecda312c1b0c8e to your computer and use it in GitHub Desktop.
Save mrleblanc101/9588416210634dd5feecda312c1b0c8e to your computer and use it in GitHub Desktop.
<script setup lang="ts">
import { twMerge } from 'tailwind-merge';
import { NuxtLink } from '#components';
type ButtonProps = {
prefixIcon?: string;
suffixIcon?: string;
iconClasses?: string;
size?: 'default' | 'small' | 'large';
rounded?: boolean;
balanced?: boolean;
hoverEffect?: boolean;
variant?: 'info' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
};
type TypeButton = {
type?: 'button' | 'submit' | 'reset';
to?: never;
};
type TypeLink = {
type?: never;
to?: string;
};
const {
type = 'button',
variant = 'primary',
hoverEffect = true,
} = defineProps<ButtonProps & (TypeButton | TypeLink)>();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment