From 874b7f8593f27f33ff6789ba5bdc1575d9207483 Mon Sep 17 00:00:00 2001 From: Jared Lunde Date: Fri, 29 Oct 2021 19:35:33 -0600 Subject: [PATCH] fix: make server types more generalized --- server/src/index.tsx | 6 +++--- server/types/index.d.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/src/index.tsx b/server/src/index.tsx index 9f46242..60b9c6b 100644 --- a/server/src/index.tsx +++ b/server/src/index.tsx @@ -14,7 +14,7 @@ import { renderToStaticMarkup } from "react-dom/server"; */ export function toComponent( html: string, - styles: Styles = defaultStyles + styles: Styles = defaultStyles ): React.ReactElement { const { dash } = styles; const { names, css } = createStylesFromString(html, styles); @@ -69,7 +69,7 @@ export interface StyleProps { /** * An instance of `styles()`. Defaults to the default styles instance in `@dash-ui/styles`. */ - styles?: Styles; + styles?: Styles; } /** @@ -82,7 +82,7 @@ export interface StyleProps { * // gatsby-ssr.js * exports.replaceRenderer = require('@dash-ui/react/server').createGatsbyRenderer() */ -export function createGatsbyRenderer(styles: Styles = defaultStyles) { +export function createGatsbyRenderer(styles: Styles = defaultStyles) { /* istanbul ignore next */ return function replaceRenderer

(props: P): P { // @ts-expect-error diff --git a/server/types/index.d.ts b/server/types/index.d.ts index b41b0de..115d76f 100644 --- a/server/types/index.d.ts +++ b/server/types/index.d.ts @@ -10,7 +10,7 @@ import * as React from "react"; */ export declare function toComponent( html: string, - styles?: Styles + styles?: Styles ): React.ReactElement; /** * A React component for injecting SSR CSS styles into Next.js documents @@ -54,7 +54,7 @@ export interface StyleProps { /** * An instance of `styles()`. Defaults to the default styles instance in `@dash-ui/styles`. */ - styles?: Styles; + styles?: Styles; } /** * Creates a Gatsby replaceRenderer for injecting styles generated by Dash on @@ -67,6 +67,6 @@ export interface StyleProps { * exports.replaceRenderer = require('@dash-ui/react/server').createGatsbyRenderer() */ export declare function createGatsbyRenderer( - styles?: Styles + styles?: Styles ):

(props: P) => P; export * from "@dash-ui/styles/server";