From 2bdad302245d270f21675239aaf484d6871b2c69 Mon Sep 17 00:00:00 2001 From: Abu Shamsutdinov Date: Sun, 20 Jan 2019 00:36:45 +0300 Subject: [PATCH] fix(src): small fix --- __tests__/HOFs.spec.js | 6 +++--- src/HOFs.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/__tests__/HOFs.spec.js b/__tests__/HOFs.spec.js index cea8497c..19745802 100644 --- a/__tests__/HOFs.spec.js +++ b/__tests__/HOFs.spec.js @@ -1,4 +1,4 @@ -import { withMinMedia, withMaxMedia, widthMinAndMaxMedia } from '../src/HOFs'; +import { withMinMedia, withMaxMedia, withMinAndMaxMedia } from '../src/HOFs'; describe('HOFs', () => { describe('withMinMedia', () => { @@ -13,9 +13,9 @@ describe('HOFs', () => { }); }); - describe('widthMinAndMaxMedia', () => { + describe('withMinAndMaxMedia', () => { it('should return string containing the breakpoint value with media query', () => { - expect(widthMinAndMaxMedia('40em', '60em')).toEqual( + expect(withMinAndMaxMedia('40em', '60em')).toEqual( '@media (min-width: 40em) and (max-width: 60em)', ); }); diff --git a/src/HOFs.js b/src/HOFs.js index 5eceda95..38eff492 100644 --- a/src/HOFs.js +++ b/src/HOFs.js @@ -6,5 +6,5 @@ export const withMinMedia = (minWidth: any): string => export const withMaxMedia = (maxWidth: any): string => `@media (max-width: ${maxWidth})`; -export const widthMinAndMaxMedia = (minWidth: any, maxWidth: any): string => +export const withMinAndMaxMedia = (minWidth: any, maxWidth: any): string => `@media (min-width: ${minWidth}) and (max-width: ${maxWidth})`;