Skip to content

Commit a8edc83

Browse files
chore(release): 1.0.0-alpha.5
# [1.0.0-alpha.5](v1.0.0-alpha.4...v1.0.0-alpha.5) (2021-11-07) ### Features * allow nonce on server style tag ([92e527a](92e527a))
1 parent 92e527a commit a8edc83

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# [1.0.0-alpha.5](https://github.com/dash-ui/react/compare/v1.0.0-alpha.4...v1.0.0-alpha.5) (2021-11-07)
2+
3+
4+
### Features
5+
6+
* allow nonce on server style tag ([92e527a](https://github.com/dash-ui/react/commit/92e527a05eb4e07423faf04b1cd0b29ce3a28b95))
7+
18
# [1.0.0-alpha.4](https://github.com/dash-ui/react/compare/v1.0.0-alpha.3...v1.0.0-alpha.4) (2021-11-06)
29

310

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@dash-ui/react",
3-
"version": "1.0.0-alpha.4",
3+
"version": "1.0.0-alpha.5",
44
"description": "React components and hooks for dash-ui",
55
"license": "MIT",
66
"author": "Jared Lunde <[email protected]> (https://jaredLunde.com)",

server/types/index.d.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,19 @@ import * as React from "react";
77
* @param html - The HTML generated by `renderToStaticMarkup()` or `renderToString()`
88
* @param styles - An instance of `styles()`. Defaults to the default styles instance
99
* in `@dash-ui/styles`.
10+
* @param options
11+
* @param options.nonce
1012
*/
11-
export declare function toComponent(html: string, styles?: Styles<any, any>): React.ReactElement;
13+
export declare function toComponent(html: string, styles?: Styles<any, any>, options?: {
14+
nonce?: string;
15+
}): React.ReactElement;
1216
/**
1317
* A React component for injecting SSR CSS styles into Next.js documents
1418
*
1519
* @param root0
1620
* @param root0.html
1721
* @param root0.styles
22+
* @param root0.nonce
1823
* @example
1924
* // _document.js
2025
* import React from 'react'
@@ -36,7 +41,7 @@ export declare function toComponent(html: string, styles?: Styles<any, any>): Re
3641
* }
3742
* }
3843
*/
39-
export declare function Style({ html, styles }: StyleProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
44+
export declare function Style({ html, styles, nonce }: StyleProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
4045
export interface StyleProps {
4146
/**
4247
* The HTML generated by Next.js, `renderToStaticMarkup()` or `renderToString()`
@@ -46,6 +51,10 @@ export interface StyleProps {
4651
* An instance of `styles()`. Defaults to the default styles instance in `@dash-ui/styles`.
4752
*/
4853
styles?: Styles<any, any>;
54+
/**
55+
* A nonce for the `<style>` tag.
56+
*/
57+
nonce?: Styles<any, any>["dash"]["sheet"]["nonce"];
4958
}
5059
/**
5160
* Creates a Gatsby replaceRenderer for injecting styles generated by Dash on

0 commit comments

Comments
 (0)