react-google-reviews
Advanced tools
Comparing version 1.3.1 to 1.4.0
@@ -79,2 +79,12 @@ /** @jsxImportSource @emotion/react */ | ||
accessibility?: boolean; | ||
/** | ||
* Hide reviews without text | ||
* Default: false | ||
*/ | ||
hideEmptyReviews?: boolean; | ||
/** | ||
* Disables translation from Google to use original review text | ||
* Default: false | ||
*/ | ||
disableTranslation?: boolean; | ||
} & StructuredDataProps; | ||
@@ -81,0 +91,0 @@ type ReactGoogleReviewsWithPlaceIdBaseProps = ReactGoogleReviewsBaseProps & { |
@@ -79,2 +79,12 @@ /** @jsxImportSource @emotion/react */ | ||
accessibility?: boolean; | ||
/** | ||
* Hide reviews without text | ||
* Default: false | ||
*/ | ||
hideEmptyReviews?: boolean; | ||
/** | ||
* Disables translation from Google to use original review text | ||
* Default: false | ||
*/ | ||
disableTranslation?: boolean; | ||
} & StructuredDataProps; | ||
@@ -81,0 +91,0 @@ type ReactGoogleReviewsWithPlaceIdBaseProps = ReactGoogleReviewsBaseProps & { |
@@ -238,2 +238,12 @@ import React$1 from 'react'; | ||
accessibility?: boolean; | ||
/** | ||
* Hide reviews without text | ||
* Default: false | ||
*/ | ||
hideEmptyReviews?: boolean; | ||
/** | ||
* Disables translation from Google to use original review text | ||
* Default: false | ||
*/ | ||
disableTranslation?: boolean; | ||
} & StructuredDataProps; | ||
@@ -240,0 +250,0 @@ type ReactGoogleReviewsWithPlaceIdBaseProps = ReactGoogleReviewsBaseProps & { |
{ | ||
"name": "react-google-reviews", | ||
"version": "1.3.1", | ||
"version": "1.4.0", | ||
"description": "A React component to easily display Google reviews using Google Places API or Google My Business API.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -130,3 +130,3 @@ | ||
> [!NOTE] | ||
> The Google Places API **only returns the 5 most recent reviews.** If you need more reviews or want to customize which reviews are returned, consider using the free Featurable API. | ||
> The Google Places API **only returns the 5 most recent reviews.** If you need more reviews or want to customize which reviews are returned, consider using the [free Featurable API](https://featurable.com/). | ||
@@ -230,19 +230,34 @@ ## Configuration | ||
| --- | --- | --- | | ||
| featurableId | string | Featurable widget ID | | ||
| reviews | GoogleReview[] | Array of reviews to display, fetched using `dangerouslyFetchPlaceReviews` | | ||
| featurableId | `string` | Featurable widget ID | | ||
| reviews | [GoogleReview](#googlereview)[] | Array of reviews to display, fetched using `dangerouslyFetchPlaceReviews` | | ||
| layout | `"badge" \| "carousel" \| "custom"` | Layout of the reviews component | | ||
| nameDisplay?| `"fullNames" \| "firstAndLastInitials" \| "firstNamesOnly"` | How to display names on reviews |; | ||
| logoVariant? | `"logo" \| "icon" \| "none"` | How to display the Google logo | | ||
| maxCharacters? | number | When collapsed, the maximum number of characters to display in the review body | | ||
| maxCharacters? | `number` | When collapsed, the maximum number of characters to display in the review body | | ||
| dateDisplay? | `"relative" \| "absolute"` | How to display the review date | | ||
| reviewVariant? | `"card" \| "testimonial"` | Review layout variations | | ||
| theme? | `"light" \| "dark"` | Color scheme of the component | | ||
| structuredData? | boolean | Whether to include JSON-LD structured data for SEO | | ||
| brandName? | string | Customize business name for structured data | | ||
| productName? | string | Customize product name for structured data | | ||
| productDescription? | string | Optional product description for structured data | | ||
| accessibility? | boolean | Enable/disable accessibility features | | ||
| totalReviewCount? | number | Total number of reviews on Google Business profile. This is automatically fetched if using `featurableId`. Otherwise, this is required if passing reviews manually and `structuredData` is true. | | ||
| averageRating? | number | Average rating for Google Business profile. This is automatically fetched if using `featurableId`. Otherwise, this is required if passing reviews manually and `structuredData` is true. | | ||
| structuredData? | `boolean` | Whether to include JSON-LD structured data for SEO | | ||
| brandName? | `string` | Customize business name for structured data | | ||
| productName? | `string` | Customize product name for structured data | | ||
| productDescription? | `string` | Optional product description for structured data | | ||
| accessibility? | `boolean` | Enable/disable accessibility features | | ||
| hideEmptyReviews? | `boolean` | Hide reviews without text | | ||
| disableTranslation? | `boolean` | Disables translation from Google to use original review text | | ||
| totalReviewCount? | `number` | Total number of reviews on Google Business profile. This is automatically fetched if using `featurableId`. Otherwise, this is required if passing reviews manually and `structuredData` is true. | | ||
| averageRating? | `number` | Average rating for Google Business profile. This is automatically fetched if using `featurableId`. Otherwise, this is required if passing reviews manually and `structuredData` is true. | | ||
#### `GoogleReview` Model | ||
| Prop | Type | Description | | ||
| --- | --- | --- | | ||
| reviewId | `string \| null` | Unique review ID | | ||
| reviewer | `{ profilePhotoUrl: string; displayName: string; isAnonymous: boolean; }` | Reviewer information | | ||
| starRating | `number` | Star rating (1-5) | | ||
| comment | `string` | Review text | | ||
| createTime | `string \| null` | Review creation time | | ||
| updateTime | `string \| null` | Review update time | | ||
| reviewReply? | `{ comment: string; updateTime: string; } \| null` | Review reply information | | ||
### Carousel Props | ||
@@ -252,5 +267,5 @@ | ||
| --- | --- | --- | | ||
| carouselSpeed? | number | Autoplay speed of the carousel in milliseconds | | ||
| carouselAutoplay? | boolean | Whether to autoplay the carousel | | ||
| maxItems? | number | Maximum number of items to display at any one time in carousel | | ||
| carouselSpeed? | `number` | Autoplay speed of the carousel in milliseconds | | ||
| carouselAutoplay? | `boolean` | Whether to autoplay the carousel | | ||
| maxItems? | `number` | Maximum number of items to display at any one time in carousel | | ||
@@ -261,3 +276,3 @@ ### Badge Props | ||
| --- | --- | --- | | ||
| profileUrl? | string | Link to Google Business profile, if manually fetching reviews via Place API. Using Featurable API will automatically supply this URL. | | ||
| profileUrl? | `string` | Link to Google Business profile, if manually fetching reviews via Place API. Using Featurable API will automatically supply this URL. | | ||
@@ -268,3 +283,3 @@ ### Custom Layout Props | ||
| --- | --- | --- | | ||
| renderer? | (reviews: ReactGoogleReview[]) => React.ReactNode | Custom rendering function | | ||
| renderer? | (reviews: [GoogleReview](#googlereview)[]) => React.ReactNode | Custom rendering function | | ||
@@ -281,2 +296,6 @@ ## License | ||
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. | ||
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. | ||
## Issues | ||
Please report any issues or bugs you encounter on the [GitHub Issues](https://github.com/Featurable/react-google-reviews/issues) page. |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1216735
2202
295