Skip to content

Commit

Permalink
fix: StyleSheetManager must accept undefined props (#4069)
Browse files Browse the repository at this point in the history
  • Loading branch information
gineika committed Jul 2, 2023
1 parent bb1bd5a commit f073ac8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/styled-components/src/models/StyleSheetManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@ export type IStyleSheetManager = React.PropsWithChildren<{
* uses the browser [CSSOM APIs](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet).
* When disabled, rules are inserted as simple text into style blocks.
*/
disableCSSOMInjection?: boolean;
disableCSSOMInjection?: undefined | boolean;
/**
* If you are working exclusively with modern browsers, vendor prefixes can often be omitted
* to reduce the weight of CSS on the page.
*/
enableVendorPrefixes?: boolean;
enableVendorPrefixes?: undefined | boolean;
/**
* Provide an optional selector to be prepended to all generated style rules.
*/
namespace?: string;
namespace?: undefined | string;
/**
* Create and provide your own `StyleSheet` if necessary for advanced SSR scenarios.
*/
sheet?: StyleSheet;
sheet?: undefined | StyleSheet;
/**
* Starting in v6, styled-components no longer does its own prop validation
* and recommends use of transient props "$prop" to pass style-only props to
Expand All @@ -63,18 +63,18 @@ export type IStyleSheetManager = React.PropsWithChildren<{
* Manually composing `styled.{element}.withConfig({shouldForwardProp})` will
* override this default.
*/
shouldForwardProp?: IStyleSheetContext['shouldForwardProp'];
shouldForwardProp?: undefined | IStyleSheetContext['shouldForwardProp'];
/**
* An array of plugins to be run by stylis (style processor) during compilation.
* Check out [what's available on npm*](https://www.npmjs.com/search?q=keywords%3Astylis).
*
* \* The plugin(s) must be compatible with stylis v4 or above.
*/
stylisPlugins?: stylis.Middleware[];
stylisPlugins?: undefined | stylis.Middleware[];
/**
* Provide an alternate DOM node to host generated styles; useful for iframes.
*/
target?: HTMLElement;
target?: undefined | HTMLElement;
}>;

export function StyleSheetManager(props: IStyleSheetManager): JSX.Element {
Expand Down

0 comments on commit f073ac8

Please sign in to comment.