--- import { Icon } from 'astro-icon/components'; import { twMerge } from 'tailwind-merge'; import type { CallToAction as Props } from '~/types'; const { variant = 'secondary', target, link, text = Astro.slots.render('default'), icon = '', class: className = '', type, ...rest } = Astro.props; const variants = { primary: 'btn-primary', secondary: 'btn-secondary', tertiary: 'btn btn-tertiary', link: 'cursor-pointer hover:text-primary', }; --- { type === 'button' || type === 'submit' || type === 'reset' ? ( ) : ( {icon && } ) }