@cleanweb/oore 2.0.0-beta.7 → 2.0.0-beta.8

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.
@@ -47,9 +47,6 @@ var getComponentSlotName = function (TargetComponent, child) {
47
47
  var keyTypes = ['string', 'number', 'symbol'];
48
48
  var slotName = child.props['data-slot-name'];
49
49
  if (keyTypes.includes(typeof slotName)) {
50
- if (typeof child.type === 'string') {
51
- child.props.tagName = child.type;
52
- }
53
50
  return slotName;
54
51
  }
55
52
  }
@@ -1,4 +1,5 @@
1
1
  import type { ReactElement, ReactNode, ComponentType, ReactPortal, JSX } from 'react';
2
+ /** @todo ComponentType force children to be ReactNode, but custom components can have any children type. */
2
3
  type JSXTagLike = string | keyof JSX.IntrinsicElements | ComponentType<any>;
3
4
  /** This fixes overly narrow T type used by React's ComponentProps type. */
4
5
  export type ComponentProps<T extends JSXTagLike> = (T extends ComponentType<infer P> ? P : T extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[T] : {});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleanweb/oore",
3
- "version": "2.0.0-beta.7",
3
+ "version": "2.0.0-beta.8",
4
4
  "description": "A library of helpers for writing cleaner React function components with object-oriented patterns.",
5
5
  "engines": {
6
6
  "node": ">=22"