can we put all screenshots to a doc/ folder. then this folder should be in .npmignore
and image URL should be absolute ones from gitjub content (this way they will be shown on NPM page)
also can we have here own SVG? e.g. FR logo
add here something like "that's it! now you can use this field to upload SVG images and see the preview in your Sanity Studio". Show the response example of how it will come to frontend. Then "in case you want this field to be used as a document preview, you have to add a few more settings..."
|
const IconsListItem = defineType({ |
add how to import component
could you swap here so the type fields go after name
minor but I'd suggest not using name: 'text'
because text is also a possible field type
|
preview: (props: PreviewProps<PreviewLayoutKey>) => { |
not clear about PreviewProps
and PreviewLayoutKey
is it something from Sanity types? show how to import them
|
return <InlineSvgPreviewItem {...props} /> |
if component accept only 3 certain props let's better show them directly:
return <InlineSvgPreviewItem title={title} subtitle={subtitile} icon={icon} />
BTW is it really work this way? I thought we couldn't specify the entire card for a component including the title and subtitle
|
const IconsList = defineType({ |
please add a few words here to explain that this is a component having an array of bla-bla-bla....
Also let's follow such approach: of: [{ type: iconsListItem.name }],
|
If you want to use the SVG in your preview component, you can use the `InlineSvgPreviewComponent`: |
it's not clear actually what is that about? a preview similar to previous sections would be good and give more details about where this component should be added
|
pnpm add @focus-reactive/sanity-plugin-inline-svg-input |
OMG! It's not compatible with Bun? ๐
please add also here a few standard lines about how to run it locally