Skip to content

Commit 2451c3a

Browse files
committed
fix: First changes made to function
1 parent 80da6b7 commit 2451c3a

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

packages/match-media/src/index.js renamed to packages/match-media/src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ import { useThemeUI } from 'theme-ui'
44
// Shared with @theme-ui/css
55
const defaultBreakpoints = [40, 52, 64].map(n => n + 'em')
66

7-
export const useBreakpointIndex = (options = {}) => {
7+
export const useBreakpointIndex = ({ defaultIndex = 0 }) => {
88
const context = useThemeUI()
9-
const { defaultIndex = 0 } = options
109
const breakpoints =
1110
(context.theme && context.theme.breakpoints) || defaultBreakpoints
1211

packages/match-media/tsconfig.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"compilerOptions": {
3+
"resolveJsonModule": true,
4+
"esModuleInterop": true,
5+
"moduleResolution": "node",
6+
"strict": true
7+
}
8+
}

0 commit comments

Comments
 (0)