@focus-reactive/sanity-plugin-inline-svg-input
Version:
Sanity plugin to upload and preview inline SVGs
43 lines (37 loc) • 1.03 kB
TypeScript
import { CSSProperties } from 'react'
import { JSX as JSX_2 } from 'react/jsx-runtime'
import { Plugin as Plugin_2 } from 'sanity'
import { PreviewLayoutKey } from 'sanity'
import { PreviewProps } from 'sanity'
/**
* Usage in `sanity.config.ts` (or .js)
*
* ```ts
* import {defineConfig} from 'sanity'
* import {inlineSvgInput} from '@focus-reactive/sanity-plugin-inline-svg-input'
*
* export default defineConfig({
* // ...
* plugins: [inlineSvgInput()],
* })
* ```
*/
export declare const inlineSvgInput: Plugin_2<void | InlineSvgInputConfig>
export declare interface InlineSvgInputConfig {}
export declare const InlineSvgPreviewComponent: ({
value,
className,
style,
}: {
value?: string | undefined
className?: string | undefined
style?: CSSProperties | undefined
}) => JSX_2.Element | null
export declare const InlineSvgPreviewItem: ({
icon,
title,
subtitle,
}: {
icon?: string | null | undefined
} & Pick<PreviewProps<PreviewLayoutKey>, 'title' | 'subtitle'>) => JSX_2.Element
export {}