diff --git a/assets/js/blocks/product-top-rated/block.json b/assets/js/blocks/product-top-rated/block.json
new file mode 100644
index 00000000000..0117d224c4d
--- /dev/null
+++ b/assets/js/blocks/product-top-rated/block.json
@@ -0,0 +1,92 @@
+{
+ "name": "woocommerce/product-top-rated",
+ "title": "Top Rated Products",
+ "category": "woocommerce",
+ "keywords": [ "WooCommerce", "woo-gutenberg-products-block" ],
+ "description": "Display a grid of your top rated products.",
+ "supports": {
+ "align": [ "wide", "full" ],
+ "html": false
+ },
+ "attributes": {
+ "columns": {
+ "type": "number",
+ "default": 3
+ },
+ "rows": {
+ "type": "number",
+ "default": 3
+ },
+ "alignButtons": {
+ "type": "boolean",
+ "default": false
+ },
+ "contentVisibility": {
+ "type": "object",
+ "default": {
+ "image": true,
+ "title": true,
+ "price": true,
+ "rating": true,
+ "button": true
+ },
+ "properties": {
+ "image": {
+ "type": "boolean",
+ "default": true
+ },
+ "title": {
+ "type": "boolean",
+ "default": true
+ },
+ "price": {
+ "type": "boolean",
+ "default": true
+ },
+ "rating": {
+ "type": "boolean",
+ "default": true
+ },
+ "button": {
+ "type": "boolean",
+ "default": true
+ }
+ }
+ },
+ "categories": {
+ "type": "array",
+ "default": []
+ },
+ "catOperator": {
+ "type": "string",
+ "default": "any"
+ },
+ "isPreview": {
+ "type": "boolean",
+ "default": false
+ },
+ "stockStatus": {
+ "type": "array"
+ },
+ "editMode": {
+ "type": "boolean",
+ "default": true
+ },
+ "orderby": {
+ "type": "string",
+ "enum": [
+ "date",
+ "popularity",
+ "price_asc",
+ "price_desc",
+ "rating",
+ "title",
+ "menu_order"
+ ],
+ "default": "rating"
+ }
+ },
+ "textdomain": "woo-gutenberg-products-block",
+ "apiVersion": 2,
+ "$schema": "https://schemas.wp.org/trunk/block.json"
+}
diff --git a/assets/js/blocks/product-top-rated/block.js b/assets/js/blocks/product-top-rated/block.tsx
similarity index 72%
rename from assets/js/blocks/product-top-rated/block.js
rename to assets/js/blocks/product-top-rated/block.tsx
index 65a58b199fa..388abb6b6d2 100644
--- a/assets/js/blocks/product-top-rated/block.js
+++ b/assets/js/blocks/product-top-rated/block.tsx
@@ -2,11 +2,9 @@
* External dependencies
*/
import { __ } from '@wordpress/i18n';
-import { Component } from '@wordpress/element';
import { Disabled, PanelBody } from '@wordpress/components';
import { InspectorControls } from '@wordpress/block-editor';
import ServerSideRender from '@wordpress/server-side-render';
-import PropTypes from 'prop-types';
import GridContentControl from '@woocommerce/editor-components/grid-content-control';
import GridLayoutControl from '@woocommerce/editor-components/grid-layout-control';
import ProductCategoryControl from '@woocommerce/editor-components/product-category-control';
@@ -14,22 +12,30 @@ import ProductStockControl from '@woocommerce/editor-components/product-stock-co
import { gridBlockPreview } from '@woocommerce/resource-previews';
import { getSetting } from '@woocommerce/settings';
+/**
+ * Internal dependencies
+ */
+import { Props } from './types';
/**
* Component to handle edit mode of "Top Rated Products".
*/
-class ProductTopRatedBlock extends Component {
- getInspectorControls() {
- const { attributes, setAttributes } = this.props;
- const {
- categories,
- catOperator,
- columns,
- contentVisibility,
- rows,
- alignButtons,
- stockStatus,
- } = attributes;
+export const ProductTopRatedBlock = ( {
+ attributes,
+ name,
+ setAttributes,
+}: Props ): JSX.Element => {
+ const {
+ categories,
+ catOperator,
+ columns,
+ contentVisibility,
+ rows,
+ alignButtons,
+ stockStatus,
+ isPreview,
+ } = attributes;
+ const getInspectorControls = () => {
return (