refactor(cta): elle yazılmış turuncu butonlar Button variant="cta" tek kaynağına geçti (#48)
Sihirbaz çağrı kartı (3), sıra formu (3), sıra gerekli, giriş formu, doğrulama kartı, deste demosu, meraklısına demo, seçimlerim paneli (3), rapor yok CTA'sı, arama funnel kartı, yazdır butonu. Ölçü/yerleşim sınıfları korundu; renk ve basma tepkisi variant'tan gelir. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -44,9 +44,9 @@ const PUAN_TURLERI_SECENEK = [
|
||||
type PuanTuru = (typeof PUAN_TURLERI_SECENEK)[number]["deger"];
|
||||
|
||||
// Kayıtlı profilli CTA'lar /listem boş durumunun dilini taşır (bkz.
|
||||
// listem-bos-cta.tsx): büyük turuncu buton. Sınıf seti tek yerde.
|
||||
const PROFILLI_CTA_SINIF =
|
||||
"h-12 cursor-pointer bg-orange-500 px-6 text-white transition-colors duration-200 hover:bg-orange-600";
|
||||
// listem-bos-cta.tsx): büyük turuncu buton. Renk/hareket `variant="cta"`dan,
|
||||
// ölçü burada tek yerde.
|
||||
const PROFILLI_CTA_SINIF = "h-12 px-6";
|
||||
|
||||
function turEtiketi(tur: string) {
|
||||
return PUAN_TURLERI_SECENEK.find((t) => t.deger === tur)?.etiket ?? tur.toUpperCase();
|
||||
@@ -328,9 +328,10 @@ export function CtaSiraForm({
|
||||
/>
|
||||
</div>
|
||||
<Button
|
||||
variant="cta"
|
||||
type="submit"
|
||||
disabled={yukleniyor}
|
||||
className="h-12 cursor-pointer bg-orange-500 px-6 text-white transition-colors duration-200 hover:bg-orange-600"
|
||||
className="h-12 px-6"
|
||||
>
|
||||
{yukleniyor ? "Hazırlanıyor…" : "Programları gör"}
|
||||
<ArrowRight className="size-4" aria-hidden />
|
||||
@@ -523,7 +524,8 @@ export function CtaSiraForm({
|
||||
<Button
|
||||
asChild
|
||||
size="lg"
|
||||
className={cn(PROFILLI_CTA_SINIF, "mt-6 w-full active:scale-[0.97] sm:w-auto")}
|
||||
variant="cta"
|
||||
className={cn(PROFILLI_CTA_SINIF, "mt-6 w-full sm:w-auto")}
|
||||
>
|
||||
<Link href={sonucHref()}>
|
||||
Sıralamana uygun programları gör
|
||||
@@ -545,12 +547,13 @@ export function CtaSiraForm({
|
||||
"YKS başarı sıralamanı gir; gerçek YÖK Atlas verisiyle sıralamana uygun hayal, dengeli ve güvenli dilimlerindeki programları anında listele. Ücretsiz, üyelik gerekmez."}
|
||||
</p>
|
||||
<Button
|
||||
variant="cta"
|
||||
type="button"
|
||||
size="lg"
|
||||
onClick={() => setAcik(true)}
|
||||
onPointerEnter={preloadSihirbazAdimlar}
|
||||
onFocus={preloadSihirbazAdimlar}
|
||||
className="mt-6 h-12 w-full cursor-pointer bg-orange-500 px-6 text-white transition-[background-color,transform] duration-200 hover:bg-orange-600 active:scale-[0.97] sm:w-auto"
|
||||
className="mt-6 h-12 w-full px-6 sm:w-auto"
|
||||
>
|
||||
Sıralamanı gir, programları gör
|
||||
<ArrowRight className="size-4" aria-hidden />
|
||||
|
||||
@@ -277,9 +277,10 @@ export function SihirbazBolumu({
|
||||
seni bekliyor.
|
||||
</p>
|
||||
<Button
|
||||
variant="cta"
|
||||
asChild
|
||||
size="lg"
|
||||
className="mt-6 h-12 w-full cursor-pointer bg-orange-500 px-6 text-white transition-[background-color,transform] duration-200 hover:bg-orange-600 active:scale-[0.97] sm:w-auto"
|
||||
className="mt-6 h-12 w-full px-6 sm:w-auto"
|
||||
>
|
||||
<Link href="/listem">
|
||||
Listeni gör
|
||||
@@ -299,9 +300,10 @@ export function SihirbazBolumu({
|
||||
kalan 2 kredinle danışmana soru sorarsın).
|
||||
</p>
|
||||
<Button
|
||||
variant="cta"
|
||||
asChild
|
||||
size="lg"
|
||||
className="mt-6 h-auto min-h-12 w-full cursor-pointer whitespace-normal bg-orange-500 px-4 py-3 text-white transition-[background-color,transform] duration-200 hover:bg-orange-600 active:scale-[0.97] sm:w-auto sm:px-8"
|
||||
className="mt-6 h-auto min-h-12 w-full whitespace-normal px-4 py-3 sm:w-auto sm:px-8"
|
||||
>
|
||||
<Link
|
||||
href={girisUrl}
|
||||
@@ -329,9 +331,10 @@ export function SihirbazBolumu({
|
||||
riski ve gerekçesiyle — senin yerine dizer.
|
||||
</p>
|
||||
<Button
|
||||
variant="cta"
|
||||
size="lg"
|
||||
onClick={sihirbaziBaslat}
|
||||
className="mt-6 h-auto min-h-12 w-full cursor-pointer whitespace-normal bg-orange-500 px-4 py-3 text-white transition-[background-color,transform] duration-200 hover:bg-orange-600 active:scale-[0.97] sm:w-auto sm:px-8"
|
||||
className="mt-6 h-auto min-h-12 w-full whitespace-normal px-4 py-3 sm:w-auto sm:px-8"
|
||||
>
|
||||
Listemi verilerle hesapla
|
||||
<ArrowRight className="size-4" aria-hidden />
|
||||
|
||||
@@ -53,13 +53,13 @@ export function SiraGerekli() {
|
||||
<PagePixelDivider seed={59} className="mx-auto mt-6" />
|
||||
<div className="mt-6 flex flex-wrap items-center justify-center gap-3">
|
||||
<Button
|
||||
variant="cta"
|
||||
type="button"
|
||||
onClick={() => {
|
||||
const { href } = sonucaGitIste();
|
||||
if (href) router.push(href);
|
||||
}}
|
||||
size="lg"
|
||||
className="cursor-pointer bg-orange-500 text-white transition-[background-color,transform] duration-200 hover:bg-orange-600 active:scale-[0.97]"
|
||||
>
|
||||
Sıralamamı gir
|
||||
<ArrowRight className="size-4" aria-hidden />
|
||||
|
||||
Reference in New Issue
Block a user