UNPKG

@redocly/graphql-docs

Version:

Redocly GraphQL docs

2 lines (1 loc) 499 B
import{jsx as n}from"react/jsx-runtime";import{isUnionType as r}from"graphql";import{memo as m,useMemo as i}from"react";import{useStore as p}from"../../app/index.js";import{GroupTypeList as s}from"../components/GroupTypeList.js";import{Box as d}from"../../common/index.js";function u({name:o}){const e=p(),t=i(()=>e?.getType(o),[o,e]);return r(t)?n(d,{"data-testid":o,direction:"column",children:t.getTypes().length?n(s,{types:t.getTypes()}):null}):null}const x=m(u);export{x as UnionItemEmbedded};