Types: ReviewsEmptyProps to SubmitReviewState
The types of @poltura/theme-sdk/product, ReviewsEmptyProps to SubmitReviewState.
Ezen az oldalon
import { … } from '@poltura/theme-sdk/product';ReviewsEmptyProps
Props of ReviewsEmpty.
onWrite() => voidCalled when the shopper chooses to write the first review; without it no button is drawn.
ReviewsFooterProps
Props of ReviewsFooter.
loadedrequirednumberHow many reviews are shown.
hasMorerequiredbooleanWhether more reviews can be loaded.
loadingMorerequiredbooleanWhether the next reviews are loading.
onLoadMorerequired() => voidCalled when the shopper asks for more reviews.
ReviewsHeaderProps
Props of ReviewsHeader.
headingstringReplaces the store's heading, "Customer reviews".
totalrequirednumberHow many reviews there are; the count badge is hidden at zero.
onWrite() => voidCalled when the shopper chooses to write a review; without it no button is drawn.
ReviewsProps
Props of Reviews.
byReviewsByWhose reviews to show; the product page's own, or its bundle's items, by default.
headingstringReplaces the store's heading, "Customer reviews".
classNamestringClasses added to the panel.
listClassNamestringClasses added to the list of reviews.
SubmitReviewState
The state of sending a review.
submitrequired(input: ReviewInput) => Promise<ReviewResult>Sends a review after the bot check.
statusrequired'idle' | 'submitting' | 'done' | 'error'`idle` before sending, `submitting` while it is sent, `done` once received, `error` after a failure.
errorrequiredstring | nullWhy the last send failed, in the page language, or null.
resetrequired() => voidReturns to `idle` and forgets the last result.