<SizeGuide>
Esta página aún no está disponible en tu idioma.
The native “Size guide” button: “Size guide” → “Calculating your size…” → “Your size: M”.
function SizeGuide({ product, variant = "link", label, style, onRecommendation }: SizeGuideProps)productstringObligatoriovariant"link" | "button"Opcional"link" (default): link-sized text with the mark. "button": a small bordered button.
labelstringOpcionalYour own words instead of "Size guide".
styleStyleProp<ViewStyle>OpcionalonRecommendation(r: Recommendation) => voidOpcionalThe shopper's recommended size, on show and on every change (sizes only).
Example
Section titled “Example”<SizeGuide product="SKU-123" onRecommendation={(rec) => rec.status === "ready" && !touched && setSize(rec.size)}/>// SwiftUI, where your "Size guide" link wasSizeGuide(client: tys, product: "SKU-123") { rec in if rec.status == .ready, !touched { selectedSize = rec.size }}// Compose, where your "Size guide" link wasSizeGuide(tys, "SKU-123", textStyle = MaterialTheme.typography.bodyMedium) { rec -> if (rec.status == Recommendation.Status.READY && !touched) selected = rec.size}const SizeGuide(product: 'SKU-123') // listen to tys.onRecommendation to preselect¿Te ha resultado útil esta página?
Gracias. Leemos todas las respuestas.