import { ComponentPropsWithoutRef, ElementType } from 'react'; import { TextWithIconsProps } from '../../Base/TextWithIcons/TextWithIcons'; type TextLinkOwnProps = TextWithIconsProps & { href: string; }; export type TextLinkProps = TextLinkOwnProps & { as?: T; } & Omit, 'as' | 'href' | 'children' | keyof TextLinkOwnProps>; /** * 텍스트 기반의 링크 컴포넌트입니다. * * @description * TextButton과 동일한 스타일을 가지지만 기본적으로 `` 태그 기반으로 페이지 네비게이션을 담당합니다. * `as` prop으로 Next.js의 `Link`나 React Router의 `Link` 등 임의의 컴포넌트를 주입할 수 있고, * 주입된 컴포넌트의 전용 props(예: next/link의 `prefetch`)도 타입 추론됩니다. * * @component * @param {Object} props - TextLink 컴포넌트의 props * @param {string} props.href - 링크 대상 URL (필수) * @param {string} props.text - 표시할 텍스트 (필수) * @param {ElementType} [props.as='a'] - 렌더링할 요소/컴포넌트 * @param {SystemIconName} [props.leadingIcon] - 텍스트 앞에 표시할 아이콘 * @param {SystemIconName} [props.trailingIcon] - 텍스트 뒤에 표시할 아이콘 * @param {boolean} [props.isTextSmall=false] - 작은 텍스트 크기 사용 여부 * @param {boolean} [props.isGray=false] - 텍스트 색상을 회색으로 사용 여부 * @param {boolean} [props.isUnderline=false] - 텍스트에 밑줄 스타일 적용 여부 * * @example * // 기본 사용법 (일반 ) * * * @example * // Next.js Link와 함께 사용 — prefetch 등 Link 전용 prop도 타입 추론됨 * import Link from 'next/link'; * * * @example * // 외부 링크 * */ declare const TextLink: ({ as, href, text, leadingIcon, trailingIcon, isTextSmall, isGray, isUnderline, className, ...rest }: TextLinkProps) => import("react/jsx-runtime").JSX.Element; export { TextLink };