UNPKG

polen

Version:

A framework for delightful GraphQL developer portals

14 lines 905 B
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { GrafaidOld } from '#lib/grafaid-old/index'; import { Box, Text } from '@radix-ui/themes'; import { ArgumentListAnnotation } from './ArgumentListAnnotation.js'; import { DeprecationReason } from './DeprecationReason.js'; import { Description } from './Description.js'; import { TypeAnnotation } from './TypeAnnotation.js'; export const Field = ({ data, ...boxProps }) => { const argumentList = GrafaidOld.isOutputField(data) ? _jsx(ArgumentListAnnotation, { field: data }) : null; return (_jsxs(Box, { ...boxProps, id: data.name, children: [_jsx(Description, { data: data }), _jsx(DeprecationReason, { data: data }), _jsx(Text, { weight: 'medium', children: data.name }), _jsxs(Text, { children: [argumentList, ":", ` `, _jsx(TypeAnnotation, { type: data.type })] })] })); }; //# sourceMappingURL=Field.js.map