Skip to content

Commit

Permalink
[field] Add object field diff component
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars committed Oct 6, 2020
1 parent c8ea2a1 commit 9d8c39d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ import {ReferenceFieldDiff} from './reference'
import {ImageFieldDiff} from './image'
import {FileFieldDiff} from './file'
import {BooleanFieldDiff} from './boolean'
import {ObjectFieldDiff} from './object'

export const defaultComponents: {[key: string]: DiffComponent<any>} = {
object: ObjectFieldDiff,
string: StringFieldDiff,
number: NumberFieldDiff,
reference: ReferenceFieldDiff,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react'
import {DiffComponent, ObjectDiff} from '../../types'
import {ChangeList} from '../../changes'

export const ObjectFieldDiff: DiffComponent<ObjectDiff> = ({diff, schemaType}) => {
return <ChangeList diff={diff} schemaType={schemaType} />
}
1 change: 1 addition & 0 deletions packages/@sanity/field/src/diff/components/object/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './ObjectFieldDiff'

0 comments on commit 9d8c39d

Please sign in to comment.