@equinor/fusion-react-utils
Advanced tools
Comparing version 2.0.5 to 2.1.0
@@ -1,5 +0,5 @@ | ||
import type { ForwardRefExoticComponent, HTMLAttributes, PropsWithoutRef, Ref, RefAttributes } from 'react'; | ||
import type { HTMLAttributes, PropsWithoutRef, Ref, RefAttributes } from 'react'; | ||
export type ComponentAttributes<T = HTMLHtmlElement> = Omit<React.HTMLAttributes<T>, 'children'>; | ||
export type ComponentProps<E extends HTMLElement, P = {}> = HTMLAttributes<E> & P & { | ||
ref?: Ref<E>; | ||
readonly ref?: Ref<E>; | ||
}; | ||
@@ -9,2 +9,3 @@ type Ctor<T> = { | ||
}; | ||
export type WebComponent<E extends HTMLElement, P extends Record<string, unknown>> = React.ForwardRefExoticComponent<PropsWithoutRef<ComponentAttributes<E> & P> & RefAttributes<E>>; | ||
/** | ||
@@ -20,4 +21,4 @@ * Wraps a custom element as a React Component | ||
displayName?: string | undefined; | ||
}) => ForwardRefExoticComponent<PropsWithoutRef<ComponentAttributes<E> & P> & RefAttributes<E>>; | ||
}) => WebComponent<E, P>; | ||
export default createComponent; | ||
//# sourceMappingURL=create-element.d.ts.map |
{ | ||
"name": "@equinor/fusion-react-utils", | ||
"version": "2.0.5", | ||
"version": "2.1.0", | ||
"description": "Helper and util functions for React", | ||
@@ -32,8 +32,2 @@ "keywords": [ | ||
}, | ||
"scripts": { | ||
"build": "tsc -b", | ||
"lint": "eslint --ext .ts,.tsx,.js src/", | ||
"lint:fix": "eslint --ext .ts,.tsx,.js src/ --fix", | ||
"prepack": "npm run build" | ||
}, | ||
"bugs": { | ||
@@ -46,3 +40,4 @@ "url": "https://github.com/equinor/fusion-react-components/issues" | ||
"devDependencies": { | ||
"react": "^18.1.0" | ||
"@types/react": "^18.2.24", | ||
"react": "^18.2.0" | ||
}, | ||
@@ -52,3 +47,7 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "b4eca4939a25d2eeae323d8b2eec6cc0718b1306" | ||
} | ||
"scripts": { | ||
"build": "tsc -b", | ||
"lint": "eslint --ext .ts,.tsx,.js src/", | ||
"lint:fix": "eslint --ext .ts,.tsx,.js src/ --fix" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
381
48802
2