@mirohq/design-system-types 0.5.0 → 0.6.0
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.
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/react.d.ts +15 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @mirohq-internal/design-system-types
|
|
2
2
|
|
|
3
|
+
## 0.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#212](https://github.com/miroapp-dev/design-system/pull/212) [`af64a21f`](https://github.com/miroapp-dev/design-system/commit/af64a21f20d03be51d0aba2786cdb015aa136889) Thanks [@ivanbanov](https://github.com/ivanbanov)! - Added DOMEvenAttributes type
|
|
8
|
+
|
|
3
9
|
## 0.5.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/package.json
CHANGED
package/src/react.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
HTMLProps,
|
|
3
|
+
ComponentProps,
|
|
4
|
+
ElementType,
|
|
5
|
+
DOMAttributes,
|
|
6
|
+
} from 'react'
|
|
2
7
|
|
|
3
8
|
/**
|
|
4
9
|
* Automatically infers the type of the HTML element based on the component props
|
|
@@ -16,3 +21,12 @@ export type OnlyHTMLAttributes<T extends ElementType> = Pick<
|
|
|
16
21
|
ComponentProps<T>,
|
|
17
22
|
keyof HTMLProps<InferHTMLElement<T>>
|
|
18
23
|
>
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Only `on` DOMAttributes
|
|
27
|
+
*/
|
|
28
|
+
export type DOMEventAttributes<T> = {
|
|
29
|
+
[K in keyof DOMAttributes<T> as K extends `on${string}`
|
|
30
|
+
? K
|
|
31
|
+
: never]: DOMAttributes<T>
|
|
32
|
+
}
|