Move more files for src/graphql (#36577)
This commit is contained in:
18
src/graphql/components/InputObject.tsx
Normal file
18
src/graphql/components/InputObject.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user