import type { GraphqlChange } from '#lib/graphql-change/index' import { Code } from '@radix-ui/themes' import type React from 'react' import { ChangeBase } from '../ChangeBase.js' export const FieldDeprecationReason: React.FC<{ change: GraphqlChange.Group.FieldDeprecationReason }> = ( { change }, ) => { switch (change.type) { case `FIELD_DEPRECATION_REASON_ADDED`: return ( Added deprecation reason to field {change.meta.fieldName} on {change.meta.typeName} {change.meta.addedDeprecationReason && <>: "{change.meta.addedDeprecationReason}"} ) case `FIELD_DEPRECATION_REASON_REMOVED`: return ( Removed deprecation reason from field {change.meta.fieldName} on{' '} {change.meta.typeName} ) case `FIELD_DEPRECATION_REASON_CHANGED`: return ( Changed deprecation reason for field {change.meta.fieldName} on{' '} {change.meta.typeName} from {change.meta.oldDeprecationReason} to{' '} {change.meta.newDeprecationReason} ) } }