Skip to content
This repository was archived by the owner on Jun 20, 2022. It is now read-only.

Commit 5e7655e

Browse files
committed
tests: fix tests
1 parent 622dfd2 commit 5e7655e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/utils.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { css } from 'styled-components'
22
import defaultBreakpoints from './theme/defaultBreakpoints'
33

4-
const getBreakpoints = props =>
4+
export const getBreakpoints = props =>
55
(props && props.theme && props.theme.breakpoints) || defaultBreakpoints
66

7-
const getBreakpointsEntries = props => {
7+
export const getBreakpointsEntries = props => {
88
const breakpoints = getBreakpoints(props)
99
const entries = Object.keys(breakpoints).reduce(
1010
(entries, key) => [...entries, [key, breakpoints[key]]],
@@ -13,13 +13,13 @@ const getBreakpointsEntries = props => {
1313
return entries.sort((a, b) => a[1] > b[1])
1414
}
1515

16-
const getNextBreakpoint = (name, props) => {
16+
export const getNextBreakpoint = (name, props) => {
1717
const entries = getBreakpointsEntries(props)
1818
const index = entries.findIndex(([key]) => key === name)
1919
return index < entries.length - 1 ? entries[index + 1][0] : null
2020
}
2121

22-
const getPreviousBreakpoint = (name, props) => {
22+
export const getPreviousBreakpoint = (name, props) => {
2323
const entries = getBreakpointsEntries(props)
2424
const index = entries.findIndex(([key]) => key === name)
2525
return index >= 1 ? entries[index - 1][0] : null
@@ -29,7 +29,7 @@ const getPreviousBreakpoint = (name, props) => {
2929
* Minimum breakpoint width.
3030
* Null for the smallest breakpoint.
3131
*/
32-
const getBreakpointMin = (name, props) => {
32+
export const getBreakpointMin = (name, props) => {
3333
const breakpoints = getBreakpoints(props)
3434
const breakPoint = breakpoints[name]
3535
return breakPoint !== 0 ? breakPoint : null
@@ -43,7 +43,7 @@ const getBreakpointMin = (name, props) => {
4343
* Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.
4444
* See https://bugs.webkit.org/show_bug.cgi?id=178261
4545
*/
46-
const getBreakpointMax = (name, props) => {
46+
export const getBreakpointMax = (name, props) => {
4747
const next = getNextBreakpoint(name, props)
4848
return next ? getBreakpointMin(next, props) - 0.02 : null
4949
}

0 commit comments

Comments
 (0)