From 51369761a8e0090a18daa9376771bc8c5b57204c Mon Sep 17 00:00:00 2001 From: balazsmatepetro Date: Thu, 4 Jun 2020 11:32:13 +0200 Subject: [PATCH 1/3] chore: add missing type definition for `FocusWithin` component --- packages/react-focus-within/src/index.d.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 packages/react-focus-within/src/index.d.ts diff --git a/packages/react-focus-within/src/index.d.ts b/packages/react-focus-within/src/index.d.ts new file mode 100644 index 0000000..18fe227 --- /dev/null +++ b/packages/react-focus-within/src/index.d.ts @@ -0,0 +1,16 @@ +import React from 'react' + +type RenderProps = (props: { + focused: boolean; + getRef: React.MutableRefObject; +}) => React.ReactNode + +export interface Props { + children: React.ReactNode | RenderProps; + onBlur?: (event: React.MouseEvent) => void; + onFocus?: (event: React.MouseEvent) => void; +} + +declare class FocusWithin extends React.Component {} + +export default FocusWithin From 1cef2450d0211304a64af355613379673ff55754 Mon Sep 17 00:00:00 2001 From: balazsmatepetro Date: Thu, 4 Jun 2020 11:47:54 +0200 Subject: [PATCH 2/3] chore: add changeset about the newly created `FocusWithin` typing file --- .changeset/new-goats-brake.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/new-goats-brake.md diff --git a/.changeset/new-goats-brake.md b/.changeset/new-goats-brake.md new file mode 100644 index 0000000..18798ef --- /dev/null +++ b/.changeset/new-goats-brake.md @@ -0,0 +1,5 @@ +--- +'@component-driven/react-focus-within': patch +--- + +Add missing type definitions file for `FocusWithin` component. From 161bbe738c6ce9c11768ad8875320e39e17102df Mon Sep 17 00:00:00 2001 From: balazsmatepetro Date: Thu, 4 Jun 2020 14:17:02 +0200 Subject: [PATCH 3/3] chore: update changeset type --- .changeset/new-goats-brake.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/new-goats-brake.md b/.changeset/new-goats-brake.md index 18798ef..6346c25 100644 --- a/.changeset/new-goats-brake.md +++ b/.changeset/new-goats-brake.md @@ -1,5 +1,5 @@ --- -'@component-driven/react-focus-within': patch +'@component-driven/react-focus-within': minor --- Add missing type definitions file for `FocusWithin` component.