Skip to content

Commit 91e7ddb

Browse files
committed
fix(reviews): default button label for review form
1 parent 7927d26 commit 91e7ddb

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

.changeset/common-queens-smoke.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@bigcommerce/catalyst-core": patch
3+
---
4+
5+
Passes `formButtonLabel` from `Reviews` to `ReviewsEmptyState` (was missing) and sets a default value for `formButtonLabel`

core/vibes/soul/sections/reviews/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export function Reviews({
4949
emptyStateMessage,
5050
reviewsLabel = 'Reviews',
5151
action,
52-
formButtonLabel,
52+
formButtonLabel = 'Write a review',
5353
formModalTitle,
5454
formSubmitLabel,
5555
formRatingLabel,
@@ -68,6 +68,7 @@ export function Reviews({
6868
return (
6969
<ReviewsEmptyState
7070
action={action}
71+
formButtonLabel={formButtonLabel}
7172
formEmailLabel={formEmailLabel}
7273
formModalTitle={formModalTitle}
7374
formNameLabel={formNameLabel}
@@ -182,7 +183,7 @@ export function ReviewsEmptyState({
182183
reviewsLabel = 'Reviews',
183184
productId,
184185
action,
185-
formButtonLabel,
186+
formButtonLabel = 'Write a review',
186187
formModalTitle,
187188
formSubmitLabel,
188189
formRatingLabel,

0 commit comments

Comments
 (0)