Skip to content

Commit d4b9b38

Browse files
authored
Merge pull request #27 from faceless-ui/fix/types
Fix/types
2 parents fd89f6a + da4a868 commit d4b9b38

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@faceless-ui/window-info",
3-
"version": "2.1.0",
3+
"version": "2.1.1",
44
"main": "dist/index.js",
55
"types": "dist/index.d.ts",
66
"homepage:": "https://facelessui.com/docs/window-info",

src/WindowInfoProvider/index.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { useCallback, useEffect, useReducer, useRef } from 'react';
2-
import { Breakpoints } from '../types';
32
import WindowInfoContext, { IWindowInfoContext } from '../WindowInfoProvider/context';
43

54
type AnimationRef = React.MutableRefObject<number | null>;
@@ -69,10 +68,16 @@ const reducer = (
6968
return newState;
7069
};
7170

72-
const WindowInfoProvider: React.FC<{
71+
export type Breakpoints = {
72+
[key: string]: string
73+
}
74+
75+
export type WindowInfoProviderProps = {
7376
breakpoints: Breakpoints
7477
children?: React.ReactNode
75-
}> = (props) => {
78+
}
79+
80+
const WindowInfoProvider: React.FC<WindowInfoProviderProps> = (props) => {
7681
const {
7782
breakpoints,
7883
children,

0 commit comments

Comments
 (0)