-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
acb3976
commit 257f675
Showing
10 changed files
with
34 additions
and
18 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
export * from './Change' | ||
export * from './ChangeLayout' | ||
export * from './ChangeList' | ||
export * from './ChangeResolver' | ||
export * from './DiffAnnotation' | ||
export * from './DiffAnnotationCard' | ||
export * from './DiffAnnotationTooltip' | ||
export * from './DiffAnnotationTooltipContent' | ||
export * from './DiffFromTo' | ||
export * from './DiffString' | ||
export * from './DocumentChangeContext' | ||
export * from './MetaInfo' |
9 changes: 7 additions & 2 deletions
9
packages/@sanity/field/src/types/datetime/diff/DatetimeFieldDiff.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
import React from 'react' | ||
import {DiffComponent, StringDiff, Change} from '../../../diff' | ||
import {DiffComponent, DiffFromTo, StringDiff} from '../../../diff' | ||
import {DatetimePreview} from '../preview' | ||
|
||
export const DatetimeFieldDiff: DiffComponent<StringDiff> = ({diff, schemaType}) => { | ||
return ( | ||
<Change diff={diff} layout="grid" schemaType={schemaType} previewComponent={DatetimePreview} /> | ||
<DiffFromTo | ||
diff={diff} | ||
layout="grid" | ||
schemaType={schemaType} | ||
previewComponent={DatetimePreview} | ||
/> | ||
) | ||
} |
9 changes: 7 additions & 2 deletions
9
packages/@sanity/field/src/types/number/diff/NumberFieldDiff.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
import React from 'react' | ||
import {DiffComponent, NumberDiff, Change} from '../../../diff' | ||
import {DiffComponent, DiffFromTo, NumberDiff} from '../../../diff' | ||
import {NumberPreview} from '../preview/NumberPreview' | ||
|
||
export const NumberFieldDiff: DiffComponent<NumberDiff> = ({diff, schemaType}) => { | ||
return ( | ||
<Change diff={diff} schemaType={schemaType} previewComponent={NumberPreview} layout="inline" /> | ||
<DiffFromTo | ||
diff={diff} | ||
schemaType={schemaType} | ||
previewComponent={NumberPreview} | ||
layout="inline" | ||
/> | ||
) | ||
} |
5 changes: 2 additions & 3 deletions
5
packages/@sanity/field/src/types/reference/diff/ReferenceFieldDiff.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import React from 'react' | ||
import {DiffComponent, ObjectDiff, Change} from '../../../diff' | ||
import {DiffComponent, DiffFromTo, ObjectDiff} from '../../../diff' | ||
import {SlugPreview} from '../preview' | ||
|
||
interface Slug { | ||
current?: string | ||
} | ||
|
||
export const SlugFieldDiff: DiffComponent<ObjectDiff<Slug>> = ({diff, schemaType}) => { | ||
return <Change layout="grid" diff={diff} schemaType={schemaType} previewComponent={SlugPreview} /> | ||
return ( | ||
<DiffFromTo layout="grid" diff={diff} schemaType={schemaType} previewComponent={SlugPreview} /> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import React from 'react' | ||
import {StringDiff, DiffComponent, Change} from '../../../diff' | ||
import {DiffComponent, DiffFromTo, StringDiff} from '../../../diff' | ||
import {StringPreview} from '../../string/preview' | ||
|
||
export const UrlFieldDiff: DiffComponent<StringDiff> = ({diff, schemaType}) => { | ||
return <Change diff={diff} schemaType={schemaType} previewComponent={StringPreview} /> | ||
return <DiffFromTo diff={diff} schemaType={schemaType} previewComponent={StringPreview} /> | ||
} |