-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: update examples to use `@prismicio/client` v7 * chore: update remaining uses of `@prismicio/types` to `@prismicio/client`
- Loading branch information
1 parent
c1e469d
commit 34649e2
Showing
16 changed files
with
101 additions
and
103 deletions.
There are no files selected for viewing
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,9 +1,9 @@ | ||
{ | ||
"type": "module", | ||
"dependencies": { | ||
"@prismicio/react": "alpha" | ||
"@prismicio/react": "../../src" | ||
}, | ||
"devDependencies": { | ||
"@prismicio/types": "^0.1.4" | ||
"@prismicio/client": "^7.1.0" | ||
} | ||
} |
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,20 +1,20 @@ | ||
import * as prismicT from "@prismicio/types"; | ||
import * as prismic from "@prismicio/client"; | ||
|
||
export type HeroSlice = prismicT.Slice< | ||
export type HeroSlice = prismic.Slice< | ||
"hero", | ||
{ | ||
heading: prismicT.KeyTextField; | ||
buttonText: prismicT.KeyTextField; | ||
heading: prismic.KeyTextField; | ||
buttonText: prismic.KeyTextField; | ||
} | ||
>; | ||
|
||
export type CallToActionSlice = prismicT.Slice< | ||
export type CallToActionSlice = prismic.Slice< | ||
"call_to_action", | ||
{ | ||
text: prismicT.KeyTextField; | ||
text: prismic.KeyTextField; | ||
} | ||
>; | ||
|
||
export type Slices = HeroSlice | CallToActionSlice; | ||
|
||
export type ExampleSliceZone = prismicT.SliceZone<Slices>; | ||
export type ExampleSliceZone = prismic.SliceZone<Slices>; |
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 @@ | ||
{ | ||
"type": "module", | ||
"dependencies": { | ||
"@prismicio/react": "alpha", | ||
"@prismicio/react": "../../src", | ||
"react-router-dom": "^5.2.0" | ||
}, | ||
"devDependencies": { | ||
"@prismicio/types": "^0.1.4", | ||
"@prismicio/client": "^7.1.0", | ||
"@types/react-router-dom": "^5.1.8" | ||
} | ||
} |
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,20 +1,20 @@ | ||
import * as prismicT from "@prismicio/types"; | ||
import * as prismic from "@prismicio/client"; | ||
|
||
export type HeroSlice = prismicT.Slice< | ||
export type HeroSlice = prismic.Slice< | ||
"hero", | ||
{ | ||
heading: prismicT.KeyTextField; | ||
buttonText: prismicT.KeyTextField; | ||
heading: prismic.KeyTextField; | ||
buttonText: prismic.KeyTextField; | ||
} | ||
>; | ||
|
||
export type CallToActionSlice = prismicT.Slice< | ||
export type CallToActionSlice = prismic.Slice< | ||
"call_to_action", | ||
{ | ||
text: prismicT.KeyTextField; | ||
text: prismic.KeyTextField; | ||
} | ||
>; | ||
|
||
export type Slices = HeroSlice | CallToActionSlice; | ||
|
||
export type ExampleSliceZone = prismicT.SliceZone<Slices>; | ||
export type ExampleSliceZone = prismic.SliceZone<Slices>; |
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 @@ | ||
{ | ||
"type": "module", | ||
"dependencies": { | ||
"@prismicio/react": "alpha", | ||
"@prismicio/react": "../../src", | ||
"react-router-dom": "^5.2.0" | ||
}, | ||
"devDependencies": { | ||
"@prismicio/types": "^0.1.4", | ||
"@prismicio/client": "^7.1.0", | ||
"@types/react-router-dom": "^5.1.8" | ||
} | ||
} |
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,20 +1,20 @@ | ||
import * as prismicT from "@prismicio/types"; | ||
import * as prismic from "@prismicio/client"; | ||
|
||
export type HeroSlice = prismicT.Slice< | ||
export type HeroSlice = prismic.Slice< | ||
"hero", | ||
{ | ||
heading: prismicT.KeyTextField; | ||
buttonText: prismicT.KeyTextField; | ||
heading: prismic.KeyTextField; | ||
buttonText: prismic.KeyTextField; | ||
} | ||
>; | ||
|
||
export type CallToActionSlice = prismicT.Slice< | ||
export type CallToActionSlice = prismic.Slice< | ||
"call_to_action", | ||
{ | ||
text: prismicT.KeyTextField; | ||
text: prismic.KeyTextField; | ||
} | ||
>; | ||
|
||
export type Slices = HeroSlice | CallToActionSlice; | ||
|
||
export type ExampleSliceZone = prismicT.SliceZone<Slices>; | ||
export type ExampleSliceZone = prismic.SliceZone<Slices>; |
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,5 +1,5 @@ | ||
# With TypeScript | ||
|
||
This example shows how `@prismicio/react` is used in TypeScript projects. `@prismicio/react` is written in TypeScript using types from [`@prismicio/types`](https://github.com/prismicio/prismic-types). | ||
This example shows how `@prismicio/react` is used in TypeScript projects. `@prismicio/react` is written in TypeScript using types from [`@prismicio/client`](https://github.com/prismicio/prismic-client). | ||
|
||
You can write types for your documents using `PrismicDocument`. Components from `@prismicio/react` will type check against your document and its fields. |
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,9 +1,9 @@ | ||
{ | ||
"type": "module", | ||
"dependencies": { | ||
"@prismicio/react": "latest" | ||
"@prismicio/react": "../../src" | ||
}, | ||
"devDependencies": { | ||
"@prismicio/types": "^0.1.25" | ||
"@prismicio/client": "^7.1.0" | ||
} | ||
} |
Oops, something went wrong.