1
0
mirror of synced 2025-12-21 02:46:50 -05:00
Files
docs/components/graphql/InputObject.tsx
2023-03-06 20:58:04 +00:00

19 lines
540 B
TypeScript

import { GraphqlItem } from './GraphqlItem'
import { Table } from './Table'
import { useTranslation } from 'components/hooks/useTranslation'
import type { InputObjectT } from './types'
type Props = {
item: InputObjectT
}
export function InputObject({ item }: Props) {
const { t } = useTranslation('products')
const heading = t('graphql.reference.input_fields').replace('{{ GraphQLItemTitle }}', item.name)
return (
<GraphqlItem item={item} heading={heading}>
<Table fields={item.inputFields} />
</GraphqlItem>
)
}