2026-03-04 16:31:57 +03:00
|
|
|
import type { ComponentProps } from "react";
|
|
|
|
|
|
|
|
|
|
import React from "react";
|
|
|
|
|
|
|
|
|
|
import { ContentTextWithSuggestions } from "./content-text-with-suggestions";
|
|
|
|
|
|
2026-04-03 16:10:45 +03:00
|
|
|
type ContentTitleWithSuggestionsProps = Omit<
|
|
|
|
|
ComponentProps<typeof ContentTextWithSuggestions>,
|
|
|
|
|
"weight"
|
|
|
|
|
>;
|
2026-03-04 16:31:57 +03:00
|
|
|
|
|
|
|
|
export const ContentTitleWithSuggestions = ({
|
|
|
|
|
text,
|
|
|
|
|
ellipsis,
|
|
|
|
|
blur = false,
|
|
|
|
|
...rest
|
|
|
|
|
}: ContentTitleWithSuggestionsProps) => {
|
|
|
|
|
const normalizedEllipsis = ellipsis === undefined ? { rows: 2 } : ellipsis;
|
|
|
|
|
const textProps = text === undefined ? {} : { text };
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<ContentTextWithSuggestions
|
|
|
|
|
weight="bold"
|
|
|
|
|
blur={blur}
|
|
|
|
|
ellipsis={normalizedEllipsis}
|
|
|
|
|
{...textProps}
|
|
|
|
|
{...rest}
|
|
|
|
|
/>
|
|
|
|
|
);
|
|
|
|
|
};
|