import type { ColumnTwoWithTopProps } from '@graphcommerce/next-ui' import { breakpointVal, ColumnTwoWithTop, extendableComponent, LazyHydrate, sxx, } from '@graphcommerce/next-ui' import type { SxProps, Theme } from '@mui/material' import { Box, Typography } from '@mui/material' import type { TypographyVariant } from '@mui/material/styles' import type { ProductListItemRenderer } from '../ProductListItems/renderer' import { ProductPageName } from '../ProductPageName' import type { ProductPageDescriptionFragment } from './ProductPageDescription.gql' export type ProductPageDescriptionProps = Omit & { sx?: SxProps fontSize?: 'responsive' | TypographyVariant product: ProductPageDescriptionFragment productListRenderer: ProductListItemRenderer } const componentName = 'ProductPageDescription' const parts = ['root', 'description'] as const const { classes } = extendableComponent(componentName, parts) export function ProductPageDescription(props: ProductPageDescriptionProps) { const { product, right, fontSize = 'subtitle1', maxWidth = 'lg', sx = [], productListRenderer, } = props return ( } left={ product.description && ( ({ '& p, & li': { ...breakpointVal('fontSize', 16, 30, theme.breakpoints.values), }, })), fontSize !== 'responsive' && { '& p, & li': { fontSize, }, }, )} /> ) } right={right} /> ) }