Files
discord.js/packages/website/src/components/InheritanceText.tsx
2022-08-23 13:21:32 +02:00

17 lines
422 B
TypeScript

import { Anchor, Text } from '@mantine/core';
import Link from 'next/link';
import type { InheritanceData } from '~/DocModel/ApiNodeJSONEncoder';
export function InheritanceText({ data }: { data: InheritanceData }) {
return (
<Text weight={600}>
{'Inherited from '}
<Link href={data.path} passHref>
<Anchor component="a" className="font-mono">
{data.parentName}
</Anchor>
</Link>
</Text>
);
}