- Move components/ to src/ and compile to dist/ with tsc - Add root barrel export plus deep-import subpath exports and base.css export - Post-compile step: copy base.css, add .js import extensions, mark client modules - Add publish.sh and .npmrc for the Gitea npm registry - Fix type errors, guard TinyMCE env access, drop ace-builds type dependency - Rename clashing props type names, remove Next.js scaffolding and unused deps Co-Authored-By: Claude Opus 5.5 <[email protected]>
26 lines
702 B
TypeScript
26 lines
702 B
TypeScript
import type { ComponentProps, ReactNode } from "react";
|
|
import { ArrowUpRight } from "lucide-react";
|
|
import type { TWUI_LINK_LIST_LINK_OBJECT } from "../elements/LinkList";
|
|
import Link from "./Link";
|
|
import Row from "./Row";
|
|
|
|
type Props = ComponentProps<typeof Link> & {
|
|
link: TWUI_LINK_LIST_LINK_OBJECT;
|
|
icon?: ReactNode;
|
|
};
|
|
|
|
/**
|
|
* # Link With an Arrow
|
|
* @className twui-arrowed-link
|
|
*/
|
|
export default function ArrowedLink({ link, icon, ...props }: Props) {
|
|
return (
|
|
<Link href={link.url} {...props} {...link.linkProps}>
|
|
<Row>
|
|
<span>{link.title}</span>
|
|
{icon || <ArrowUpRight size={17} />}
|
|
</Row>
|
|
</Link>
|
|
);
|
|
}
|