1+ /// <reference types="react" />
12import type { Styles } from "@dash-ui/styles" ;
2- import * as React from "react" ;
33/**
44 * A function for creating a React `<style>` component for
55 * inserting Dash styles in SSR.
@@ -10,9 +10,13 @@ import * as React from "react";
1010 * @param options
1111 * @param options.nonce
1212 */
13- export declare function toComponent ( html : string , styles ?: Styles < any , any > , options ?: {
13+ export declare function toComponent (
14+ html : string ,
15+ styles ?: Styles < any , any > ,
16+ options ?: {
1417 nonce ?: string ;
15- } ) : React . ReactElement ;
18+ }
19+ ) : JSX . Element ;
1620/**
1721 * A React component for injecting SSR CSS styles into Next.js documents
1822 *
@@ -41,20 +45,20 @@ export declare function toComponent(html: string, styles?: Styles<any, any>, opt
4145 * }
4246 * }
4347 */
44- export declare function Style ( { html, styles, nonce } : StyleProps ) : React . ReactElement < any , string | React . JSXElementConstructor < any > > ;
48+ export declare function Style ( { html, styles, nonce } : StyleProps ) : JSX . Element ;
4549export interface StyleProps {
46- /**
47- * The HTML generated by Next.js, `renderToStaticMarkup()` or `renderToString()`
48- */
49- html : string ;
50- /**
51- * An instance of `styles()`. Defaults to the default styles instance in `@dash-ui/styles`.
52- */
53- styles ?: Styles < any , any > ;
54- /**
55- * A nonce for the `<style>` tag.
56- */
57- nonce ?: Styles < any , any > [ "dash" ] [ "sheet" ] [ "nonce" ] ;
50+ /**
51+ * The HTML generated by Next.js, `renderToStaticMarkup()` or `renderToString()`
52+ */
53+ html : string ;
54+ /**
55+ * An instance of `styles()`. Defaults to the default styles instance in `@dash-ui/styles`.
56+ */
57+ styles ?: Styles < any , any > ;
58+ /**
59+ * A nonce for the `<style>` tag.
60+ */
61+ nonce ?: Styles < any , any > [ "dash" ] [ "sheet" ] [ "nonce" ] ;
5862}
5963/**
6064 * Creates a Gatsby replaceRenderer for injecting styles generated by Dash on
@@ -66,5 +70,7 @@ export interface StyleProps {
6670 * // gatsby-ssr.js
6771 * exports.replaceRenderer = require('@dash-ui/react/server').createGatsbyRenderer()
6872 */
69- export declare function createGatsbyRenderer ( styles ?: Styles < any , any > ) : < P = any > ( props : P ) => P ;
73+ export declare function createGatsbyRenderer (
74+ styles ?: Styles < any , any >
75+ ) : < P = any > ( props : P ) => P ;
7076export * from "@dash-ui/styles/server" ;
0 commit comments