Developers
Start building
Themes/Theme SDK/Modules/product/Types: ReviewsEmptyProps to SubmitReviewState

Types: ReviewsEmptyProps to SubmitReviewState

The types of @poltura/theme-sdk/product, ReviewsEmptyProps to SubmitReviewState.

On this page
import { … } from '@poltura/theme-sdk/product';

ReviewsEmptyProps

Props of ReviewsEmpty.

onWrite() => void

Called when the shopper chooses to write the first review; without it no button is drawn.

ReviewsFooterProps

Props of ReviewsFooter.

loadedrequirednumber

How many reviews are shown.

hasMorerequiredboolean

Whether more reviews can be loaded.

loadingMorerequiredboolean

Whether the next reviews are loading.

onLoadMorerequired() => void

Called when the shopper asks for more reviews.

ReviewsHeaderProps

Props of ReviewsHeader.

headingstring

Replaces the store's heading, "Customer reviews".

totalrequirednumber

How many reviews there are; the count badge is hidden at zero.

onWrite() => void

Called when the shopper chooses to write a review; without it no button is drawn.

ReviewsProps

Props of Reviews.

byReviewsBy

Whose reviews to show; the product page's own, or its bundle's items, by default.

headingstring

Replaces the store's heading, "Customer reviews".

classNamestring

Classes added to the panel.

listClassNamestring

Classes 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 | null

Why the last send failed, in the page language, or null.

resetrequired() => void

Returns to `idle` and forgets the last result.

Last updated