ProductQuestions
Shoppers' questions about a product, each with its answers, marked by who gave
them. Without questions it says so. Place it in the questions
ProductDetailSection.
import { ProductQuestions } from "@evolve-storefront/feature-product/product-questions";Renders inside ProductListingProvider.
Preview
Usage
<ProductDetailSection id="questions"> <ProductQuestions questions={questions} /></ProductDetailSection>;Props
| Prop | Type | Description |
|---|---|---|
questions | readonly ProductQuestion[] | |
renderQuestion? | ProductQuestionRenderer | Replaces the default |
Any other props go to the root element, like on a plain HTML element.
Change the layout
Pass children to ProductQuestions to arrange its parts yourself. Every part is exported from @evolve-storefront/feature-product/product-questions.
ProductQuestionItemOne question, who asked it and when, and its answers or that there are none yet.
| Prop | Type | Description |
|---|---|---|
question | ProductQuestion |
Any other props go to the root element, like on a plain HTML element.
Examples
EmptyWithout questions the list says so, and the anchor leaves the section out.
<ProductQuestions questions={[]} />;Custom QuestionrenderQuestion replaces the default item; the list keeps its rows and keys.
<ProductQuestions questions={questions} renderQuestion={(question) => <MyQuestion question={question} />}/>;
