UNPKG

@wordpress/global-styles-ui

Version:
30 lines • 1.19 kB
import type { GlobalStylesStyles } from '@wordpress/global-styles-engine'; interface ElementPreviewProps { element: string; /** * The selected state, such as `:hover`, if any. */ state?: string; /** * The styles of the selected state, such as `:hover`, if any. The preview * is inert and can't trigger the state, so it shows these styles on top of * the sample's own. */ stateStyles?: GlobalStylesStyles; } /** * Renders a sample of an element using the site's own styles. * * The sample is real markup carrying the classes the element's selector * targets, rendered in the editor's iframe with the generated stylesheet, so it * picks up every panel, the theme's fonts and the cascade, rather than a list of * properties copied across by hand. * * @param props * @param props.element The element being previewed. * @param props.state The selected state, if any. * @param props.stateStyles The styles of the selected state, if any. */ export default function ElementPreview({ element, state, stateStyles, }: ElementPreviewProps): import("react").JSX.Element; export {}; //# sourceMappingURL=element-preview.d.ts.map