src/components/cta/CTAPhone.astro
---
/**
* CTAPhone
* CTA met prominent telefoonnummer als hoofdactie.
*/
interface Props {
eyebrow?: string;
headline: string;
sub?: string;
phone: string;
phoneLabel?: string;
secondary?: { label: string; href: string };
hours?: string;
}
const { eyebrow, headline, sub, phone, phoneLabel = 'Bel ons direct', secondary, hours } = Astro.props;
---
<section class="ctaph">
<div class="ctaph-inner">
{eyebrow && <span class="ctaph-eyebrow">{eyebrow}</span>}
<h2 class="ctaph-headline">{headline}</h2>
{sub && <p class="ctaph-sub">{sub}</p>}
<div class="ctaph-contact">
<a href={`tel:${phone.replace(/\s/g,'')}`} class="ctaph-phone-btn">
<span class="ctaph-phone-icon">📞</span>
<span>
<span class="ctaph-phone-label">{phoneLabel}</span>
<span class="ctaph-phone-num">{phone}</span>
</span>
</a>
{hours && <p class="ctaph-hours">{hours}</p>}
{secondary && <a href={secondary.href} class="ctaph-secondary">{secondary.label}</a>}
</div>
</div>
</section>
<style>
.ctaph { background: #fff; padding: 5rem 2rem; border-top: 1px solid #e5e7eb; }
.ctaph-inner { max-width: 700px; margin: 0 auto; text-align: center; }
.ctaph-eyebrow { display: block; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent,#6366f1); margin-bottom: 0.75rem; }
.ctaph-headline { font-size: clamp(1.75rem, 3.5vw, 2.75rem); font-weight: 900; color: #0a0a0a; letter-spacing: -0.04em; line-height: 1.15; margin: 0 0 0.875rem; }
.ctaph-sub { font-size: 1.0625rem; color: #6b7280; line-height: 1.65; margin: 0 0 2.5rem; }
.ctaph-contact { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.ctaph-phone-btn { display: inline-flex; align-items: center; gap: 1rem; padding: 1.125rem 2.5rem; background: #0a0a0a; color: #fff; border-radius: 0.75rem; text-decoration: none; transition: opacity 0.2s; }
.ctaph-phone-btn:hover { opacity: 0.85; }
.ctaph-phone-icon { font-size: 1.5rem; }
.ctaph-phone-label { display: block; font-size: 0.75rem; color: rgba(255,255,255,0.5); text-align: left; }
.ctaph-phone-num { display: block; font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; }
.ctaph-hours { font-size: 0.8125rem; color: #9ca3af; margin: 0; }
.ctaph-secondary { font-size: 0.9375rem; color: var(--color-accent,#6366f1); font-weight: 600; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.ctaph-secondary:hover { border-color: var(--color-accent,#6366f1); }
</style>
Props
| Prop | Type | Default | Beschrijving |
|---|---|---|---|
headline * | string | — | Hoofd CTA tekst |
phone * | string | — | Telefoonnummer (zichtbaar) |
phoneLabel | string | 'Bel ons direct' | Label boven het telefoonnummer |
eyebrow | string | — | Eyebrow boven de headline |
sub | string | — | Ondertitel |
secondary | { label: string; href: string } | — | Alternatieve actie (bijv. e-mail) |
hours | string | — | Openingstijden tekst |
* = verplicht