From b7faf2d8919ec95409dddf8241ce1306e1d9d885 Mon Sep 17 00:00:00 2001 From: Kirill Date: Tue, 2 Jun 2026 11:08:25 +0500 Subject: [PATCH] add diaposine --- .../product-form/ui/ProductFormFields.tsx | 19 ++++++++++++++----- client/src/pages/product/ui/ProductPage.tsx | 5 +++-- .../src/shared/ui/RichTextMessageContent.tsx | 17 +++++++++++------ 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/client/src/features/product-form/ui/ProductFormFields.tsx b/client/src/features/product-form/ui/ProductFormFields.tsx index ecb22d3..2bc21ea 100644 --- a/client/src/features/product-form/ui/ProductFormFields.tsx +++ b/client/src/features/product-form/ui/ProductFormFields.tsx @@ -13,6 +13,7 @@ import Typography from '@mui/material/Typography' import { Controller, type UseFormReturn } from 'react-hook-form' import type { Category } from '@/entities/product/model/types' import { OptimizedImage } from '@/shared/ui/OptimizedImage' +import { RichTextMessageEditor } from '@/shared/ui/RichTextMessageEditor' import { isValidProductPriceRub, isValidProductQuantity } from '../lib/use-product-form-helpers' import type { FormState } from '../model/types' @@ -63,11 +64,19 @@ export function ProductFormFields({ )} /> - } - /> + + + Описание + + Стилизованный текст: жирный, курсив, список + ( + + )} + /> + 0 ? : null} - {p.description || p.shortDescription ? ( - {p.description} + {p.description ? ( + ) : ( Описание появится позже. )} diff --git a/client/src/shared/ui/RichTextMessageContent.tsx b/client/src/shared/ui/RichTextMessageContent.tsx index 5cc6f8c..a488316 100644 --- a/client/src/shared/ui/RichTextMessageContent.tsx +++ b/client/src/shared/ui/RichTextMessageContent.tsx @@ -5,7 +5,7 @@ import TiptapStarterKit from '@tiptap/starter-kit' type RichTextMessageContentProps = { value: string - tone?: 'default' | 'review' | 'chat' + tone?: 'default' | 'review' | 'chat' | 'product' } export function RichTextMessageContent({ value, tone = 'default' }: RichTextMessageContentProps) { @@ -32,7 +32,7 @@ export function RichTextMessageContent({ value, tone = 'default' }: RichTextMess return (