Skip to content

Commit

Permalink
fix(breakpoints): useThemeUp inclusive min (#113)
Browse files Browse the repository at this point in the history
useThemeDown is exclusive so useThemeUp should be inclusive, otherwise
there's a hole when width is exactly value.
  • Loading branch information
agriffis committed Jul 18, 2020
1 parent 951a2b8 commit 722d5fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/breakpoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export function useThemeBreakpoint(theme) {
export function useThemeUp(theme, key) {
const value = useThemeMinValue(theme, key)
const width = useViewportWidth()
return width > value
return width >= value
}

export function useThemeDown(theme, key) {
Expand Down

0 comments on commit 722d5fc

Please sign in to comment.