clsx-react 0.9.2 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import 'react';
1
+ import * as React from 'react';
2
2
 
3
3
  type ClassNameValue =
4
4
  | string
@@ -9,8 +9,16 @@ type ClassNameValue =
9
9
  | Record<string, boolean | null | undefined>
10
10
  | ClassNameValue[];
11
11
 
12
+ type WithCustomClassName<P> = Omit<P, 'className'> & {
13
+ className?: ClassNameValue;
14
+ };
15
+
12
16
  declare global {
13
17
  namespace JSX {
18
+ type IntrinsicElements = {
19
+ [K in keyof React.JSX.IntrinsicElements]: WithCustomClassName<React.JSX.IntrinsicElements[K]>;
20
+ };
21
+
14
22
  interface IntrinsicAttributes {
15
23
  className?: ClassNameValue;
16
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clsx-react",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
4
4
  "description": "Custom React JSX Runtime to support arrays and objects in className prop natively.",
5
5
  "keywords": [
6
6
  "react",