1
+ /// <reference types="react" />
1
2
import type { Styles } from "@dash-ui/styles" ;
2
- import * as React from "react" ;
3
3
/**
4
4
* A function for creating a React `<style>` component for
5
5
* inserting Dash styles in SSR.
@@ -10,9 +10,13 @@ import * as React from "react";
10
10
* @param options
11
11
* @param options.nonce
12
12
*/
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 ?: {
14
17
nonce ?: string ;
15
- } ) : React . ReactElement ;
18
+ }
19
+ ) : JSX . Element ;
16
20
/**
17
21
* A React component for injecting SSR CSS styles into Next.js documents
18
22
*
@@ -41,20 +45,20 @@ export declare function toComponent(html: string, styles?: Styles<any, any>, opt
41
45
* }
42
46
* }
43
47
*/
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 ;
45
49
export 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" ] ;
58
62
}
59
63
/**
60
64
* Creates a Gatsby replaceRenderer for injecting styles generated by Dash on
@@ -66,5 +70,7 @@ export interface StyleProps {
66
70
* // gatsby-ssr.js
67
71
* exports.replaceRenderer = require('@dash-ui/react/server').createGatsbyRenderer()
68
72
*/
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 ;
70
76
export * from "@dash-ui/styles/server" ;
0 commit comments