@itwin/itwinui-react 1.29.0 → 1.29.1
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/cjs/core/utils/props.d.ts +4 -6
- package/esm/core/utils/props.d.ts +4 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
### [1.29.1](https://www.github.com/iTwin/iTwinUI-react/compare/v1.29.0...v1.29.1) (2022-01-19)
|
|
4
|
+
|
|
5
|
+
### Fixes
|
|
6
|
+
|
|
7
|
+
* **Button:** Improve polymorphic handling ([#512](https://www.github.com/iTwin/iTwinUI-react/issues/512)) ([6827264](https://www.github.com/iTwin/iTwinUI-react/commit/6827264397b3be5edde70426e43419a8ff161894))
|
|
8
|
+
|
|
3
9
|
## [1.29.0](https://www.github.com/iTwin/iTwinUI-react/compare/v1.28.0...v1.29.0) (2022-01-11)
|
|
4
10
|
|
|
5
11
|
### What's new
|
|
@@ -41,12 +41,10 @@ export declare type PolymorphicComponentProps<T extends React.ElementType, Props
|
|
|
41
41
|
export interface PolymorphicForwardRefComponent<T, OwnProps = Record<string, unknown>> extends React.ForwardRefExoticComponent<Merge<T extends React.ElementType ? React.ComponentPropsWithRef<T> : never, OwnProps & {
|
|
42
42
|
as?: T;
|
|
43
43
|
}>> {
|
|
44
|
-
<As = T>(props: As extends
|
|
45
|
-
as
|
|
46
|
-
} : As extends React.ComponentType<infer P> ? Merge<P, OwnProps & {
|
|
47
|
-
as
|
|
48
|
-
}> : As extends keyof JSX.IntrinsicElements ? Merge<JSX.IntrinsicElements[As], OwnProps & {
|
|
49
|
-
as: As;
|
|
44
|
+
<As = T>(props: As extends keyof JSX.IntrinsicElements ? Merge<JSX.IntrinsicElements[As], OwnProps & {
|
|
45
|
+
as?: As;
|
|
46
|
+
}> : As extends React.ComponentType<infer P> ? Merge<P, OwnProps & {
|
|
47
|
+
as?: As;
|
|
50
48
|
}> : never): React.ReactElement | null;
|
|
51
49
|
}
|
|
52
50
|
declare type Merge<P1, P2> = Omit<P1, keyof P2> & P2;
|
|
@@ -41,12 +41,10 @@ export declare type PolymorphicComponentProps<T extends React.ElementType, Props
|
|
|
41
41
|
export interface PolymorphicForwardRefComponent<T, OwnProps = Record<string, unknown>> extends React.ForwardRefExoticComponent<Merge<T extends React.ElementType ? React.ComponentPropsWithRef<T> : never, OwnProps & {
|
|
42
42
|
as?: T;
|
|
43
43
|
}>> {
|
|
44
|
-
<As = T>(props: As extends
|
|
45
|
-
as
|
|
46
|
-
} : As extends React.ComponentType<infer P> ? Merge<P, OwnProps & {
|
|
47
|
-
as
|
|
48
|
-
}> : As extends keyof JSX.IntrinsicElements ? Merge<JSX.IntrinsicElements[As], OwnProps & {
|
|
49
|
-
as: As;
|
|
44
|
+
<As = T>(props: As extends keyof JSX.IntrinsicElements ? Merge<JSX.IntrinsicElements[As], OwnProps & {
|
|
45
|
+
as?: As;
|
|
46
|
+
}> : As extends React.ComponentType<infer P> ? Merge<P, OwnProps & {
|
|
47
|
+
as?: As;
|
|
50
48
|
}> : never): React.ReactElement | null;
|
|
51
49
|
}
|
|
52
50
|
declare type Merge<P1, P2> = Omit<P1, keyof P2> & P2;
|