Skip to content

atomic-layout@0.15.0

Compare
Choose a tag to compare
@kettanaito kettanaito released this 05 Apr 10:14
· 41 commits to master since this release

Changes

  • Removes the <MediaQuery/> component (#309, #313). Please replace its usage in your code with the useMediaQuery hook:
- import { MediaQuery } from 'atomic-layout'
+ import { useMediaQuery } from 'atomic-layout'

const Usage = () => {
+  const matches = useMediaQuery({ minWidth: '500px' })

  return (
-  <MediaQuery minWidth="500px">
-    {matches => matches && <p>Conditional content</p>}
-  </MediaQuery>
+  {matches && <p>Conditional content</p>}
  )
}

Bug fixes

  • Fixes an issue that resulted into the library's README being broken on NPM (#277)