Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compatibility with @sanity-typed #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,17 @@ export default defineConfig({

That's it! Now you can use this field to upload SVG images and see the preview in your Sanity Studio.

If you use [`@sanity-typed`](https://github.com/saiichihashimoto/sanity-typed/tree/main/packages/types#sanity-typedtypes), import `inlineSvgInputTyped` instead to get the correct types in your documents:

```js
import { inlineSvgInputTyped } from 'sanity-plugin-country-state-select'

export default defineConfig({
// ...
plugins: [inlineSvgInputTyped()],
})
```

## Preview

The sections below describe how to preview your SVG within arrays, objects or your own custom preview component.
Expand Down Expand Up @@ -184,7 +195,6 @@ This project was created at **FocusReactive** - the [Sanity Partner Agency](http

If you're looking for expertise in headless CMS, NextJS, or eCommerce, get in touch with **FocusReactive** today. Visit our website at [focusreactive.com](https://focusreactive.com/) to learn more about how we can help you accelerate your business growth.

[![FocusReactive](https://raw.githubusercontent.com/focusreactive/sanity-plugin-inline-svg-input/main/docs/FR-logo-long.png)](https://focusreactive.com/sanity-expert-agency/)
---
## [![FocusReactive](https://raw.githubusercontent.com/focusreactive/sanity-plugin-inline-svg-input/main/docs/FR-logo-long.png)](https://focusreactive.com/sanity-expert-agency/)

_This project is licensed under the MIT License. © 2023 FocusReactive._
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
"watch": "pkg-utils watch --strict"
},
"dependencies": {
"@portabletext/types": "^2.0.8",
"@sanity-typed/types": "^6.1.2",
"@sanity/incompatible-plugin": "^1.0.4",
"dompurify": "^3.0.6"
},
Expand Down Expand Up @@ -82,10 +84,10 @@
"typescript": "^5.2.2"
},
"peerDependencies": {
"@sanity/ui": "^1",
"react": "^18",
"sanity": "^3",
"styled-components": "^5 || ^6",
"@sanity/ui": "^1"
"styled-components": "^5 || ^6"
},
"engines": {
"node": ">=14"
Expand Down
Loading