diff --git a/package.json b/package.json index 617e3c0..a1357bc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-list-ui-library", - "version": "1.0.0", + "version": "1.0.1", "description": "A Library with storybook for a list app", "main": "dist/index.js", "scripts": { diff --git a/src/components/List/index.tsx b/src/components/List/index.tsx index 34b163a..941684c 100644 --- a/src/components/List/index.tsx +++ b/src/components/List/index.tsx @@ -23,11 +23,11 @@ type TListProps = { /** * Is this the onClick Event of the button. */ - onClickRemoveItem?: MouseEventHandler |undefined + onClickRemoveItem?: ((index: number) => void) /** * Is this the on Event triggered by the checkbox. */ - handleChangeState?: ChangeEventHandler + handleChangeState?: ((index: number) => void) }; const List: FC = ({ @@ -44,12 +44,12 @@ const List: FC = ({ { list !== undefined && list.map((item, index) => ( - + handleChangeState !== undefined ? handleChangeState(index) : undefined} />