Binary files a/public/voice-clone/add-voice.png and b/public/voice-clone/add-voice.png differ Binary files a/public/voice-clone/my-generations.png and b/public/voice-clone/my-generations.png differ Binary files a/public/voice-clone/step-1.png and b/public/voice-clone/step-1.png differ @@ -8,6 +8,7 @@ interface Props { maxWidth?: string /** By default tooltip stops click propagation (useful inside buttons/menus). Set false when parent needs the click. */ stopClickPropagation?: boolean + wrapperWidth?: string placement?: | 'bottom-end' | 'bottom-start' @@ -36,6 +37,7 @@ export const TooltipCustom: React.FC = ({ className, maxWidth, stopClickPropagation = true, + wrapperWidth, fullWidthTrigger = false, tapToOpenOnMobile = false, }) => { @@ -43,9 +45,10 @@ export const TooltipCustom: React.FC = ({ const tapMode = Boolean(tapToOpenOnMobile && isTouchPrimary) const [tapOpen, setTapOpen] = useState(false) - const triggerSpanStyle: React.CSSProperties | undefined = fullWidthTrigger - ? { display: 'flex', width: '100%', minWidth: 0 } - : undefined + const triggerSpanStyle: React.CSSProperties | undefined = { + ...(fullWidthTrigger ? { display: 'flex', width: '100%', minWidth: 0 } : {}), + ...(wrapperWidth ? { display: 'block', width: wrapperWidth, maxWidth: '100%', minWidth: 0 } : {}), + } const tooltip = ( = memo(({ device, images, (device === 'mobile' ? 35 : 30) ? message.content : ''} + wrapperWidth={device === 'desktop' ? '250px' : '291px'} + title={message.content} > message.content.length > 0 && onPromptClick?.(message.content)} sx={{ fontSize: '15px', - maxWidth: device === 'desktop' ? '250px' : '100%', + width: '100%', marginTop: '12px', color: '#A4AAB5', + whiteSpace: 'nowrap', + overflow: 'hidden', + textOverflow: 'ellipsis', cursor: onPromptClick && message.content.length > 0 ? 'pointer' : 'default', }} > @@ -138,24 +138,27 @@ export const VideoMessagesList: React.FC = memo(({ device, videos, 30 ? message.content : ''} + wrapperWidth={device === 'desktop' ? '250px' : '291px'} + title={message.content} > message.content.length > 0 && onPromptClick?.(message.content)} sx={{ fontSize: '15px', - maxWidth: device === 'desktop' ? '250px' : '100%', + width: '100%', marginTop: '12px', color: '#A4AAB5', + whiteSpace: 'nowrap', + overflow: 'hidden', + textOverflow: 'ellipsis', cursor: onPromptClick && message.content.length > 0 ? 'pointer' : 'default', }} > {!loadedVideos.has(message.uid) ? '' : message.content.length > 0 - ? message?.content.replaceAll('"', '').slice(0, 27) + ? message?.content.replaceAll('"', '') : 'описание отсутствует'} - {message?.content.length > 27 && loadedVideos.has(message.uid) && '...'}