UNPKG

polen

Version:

A framework for delightful GraphQL developer portals

11 lines 721 B
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { Grafaid } from '#lib/grafaid/index'; import { Code, Flex } from '@radix-ui/themes'; import { Link } from '../Link.js'; import { TypeKindIcon } from './graphql.js'; import { typeKindTokensIndex } from './type-kind-tokens.js'; export const TypeLink = ({ type }) => { const kind = Grafaid.Schema.typeKindFromClass(type); return (_jsx(Link, { to: `/reference/${type.name}`, children: _jsxs(Flex, { align: 'center', gap: '1', display: 'inline-flex', children: [_jsx(TypeKindIcon, { kind: kind }), ` `, _jsx(Code, { color: typeKindTokensIndex[kind].color, variant: 'ghost', children: type.name })] }) })); }; //# sourceMappingURL=type-link.js.map