Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webcomponents-in-react",
"version": "1.0.1",
"version": "1.0.2",
"description": "Use web components in React as if they were regular React components. Zero dependencies adapter.",
"main": "dist/index.js",
"module": "dist/index.esm.js",
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import typescript from "rollup-plugin-typescript2";
import pkg from "./package.json";

export default {
input: "src/index.tsx",
input: "src/index.ts",
output: [
{
file: pkg.main,
Expand Down
4 changes: 2 additions & 2 deletions src/index.tsx → src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import {
import { OverrideProps, EventListenerMap } from "./interfaces";
import { DEFAULT_EVENT_PREFIX } from "./constants";

export const adapt = (
export const adapt = <T = any>(
componentSelector: string,
overrideProps?: OverrideProps
) => {
return (props: any) => {
return (props: T & EventListenerMap) => {
const webComponentRef = useRef<HTMLElement | null>(null);

useEffect(() => {
Expand Down