import { DEFAULT_PAGE_TITLE } from "@/shared/constants"; import { useEffect, useRef, useCallback } from "react"; export interface PageTitleProps { title: string; onInput: (e: React.ChangeEvent) => void; disabled: boolean; readOnly?: boolean; } export function PageTitle({ title, onInput, disabled, readOnly }: PageTitleProps) { const ref = useRef(null); const autoSize = useCallback(() => { const el = ref.current; if (!el) return; el.style.height = "auto"; el.style.height = el.scrollHeight + "px"; }, []); useEffect(autoSize, [title, autoSize]); return (