Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
optometrists
/
cache
/
cache
/
cache
/
cache
/
cache
/
.wp-cli
/
wp-content
/
plugins
/
woocommerce
/
packages
/
woocommerce-blocks
/
assets
/
js
/
base
/
components
/
cart-checkout
/
product-metadata
:
index.tsx
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
/** * External dependencies */ import { ProductResponseItemData } from '@woocommerce/type-defs/product-response'; import { CartVariationItem } from '@woocommerce/type-defs/cart'; /** * Internal dependencies */ import ProductDetails from '../product-details'; import ProductSummary from '../product-summary'; import './style.scss'; interface ProductMetadataProps { shortDescription?: string; fullDescription?: string; itemData: ProductResponseItemData[]; variation?: CartVariationItem[]; } const ProductMetadata = ( { shortDescription = '', fullDescription = '', itemData = [], variation = [], }: ProductMetadataProps ): JSX.Element => { return ( <div className="wc-block-components-product-metadata"> <ProductSummary className="wc-block-components-product-metadata__description" shortDescription={ shortDescription } fullDescription={ fullDescription } /> <ProductDetails details={ itemData } /> <ProductDetails details={ variation.map( ( { attribute = '', value } ) => ( { name: attribute, value, } ) ) } /> </div> ); }; export default ProductMetadata;