UNPKG

@wordpress/server-side-render

Version:

The component used with WordPress to server-side render a preview of dynamic blocks to display in the editor.

8 lines (7 loc) 1.46 kB
{ "version": 3, "sources": ["../src/types.ts"], "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport type React from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { UseServerSideRenderArgs } from './hook';\n\nexport interface PlaceholderProps {\n\t/** Additional classes to apply to the wrapper element. */\n\tclassName?: string;\n}\n\nexport interface ErrorPlaceholderProps extends PlaceholderProps {\n\t/** Error message describing the problem. */\n\tmessage?: string;\n}\n\nexport interface LoadingPlaceholderProps {\n\tchildren?: React.ReactNode;\n}\n\nexport interface ServerSideRenderProps extends UseServerSideRenderArgs {\n\t/** Additional classes to apply to the wrapper element. */\n\tclassName?: string;\n\t/** Component rendered when the API response is empty. */\n\tEmptyResponsePlaceholder?: React.ComponentType< PlaceholderProps >;\n\t/** Component rendered when the API response is an error. */\n\tErrorResponsePlaceholder?: React.ComponentType< ErrorPlaceholderProps >;\n\t/** Component rendered while the API request is loading. */\n\tLoadingResponsePlaceholder?: React.ComponentType< LoadingPlaceholderProps >;\n}\n\nexport interface ServerSideRenderWithPostIdProps\n\textends Omit< ServerSideRenderProps, 'urlQueryArgs' > {\n\t/** Additional query arguments to append to the request URL. */\n\turlQueryArgs?: Record< string, unknown >;\n}\n"], "mappings": ";;;;;;;;;;;;;;;;AAAA;AAAA;", "names": [] }