Home / atomic-layout@0.16.0
Name Modified Size InfoDownloads / Week
Parent folder
atomic-layout@0.16.0.tar.gz 2020-04-22 2.7 MB
atomic-layout@0.16.0.zip 2020-04-22 2.8 MB
README.md 2020-04-22 887 Bytes
Totals: 3 Items   5.5 MB 0

Breaking changes

  • useResponsiveComponent() function has been renamed to makeResponsive() in order to prevent a confusion over that function being a React hook (which it's not).

    :::diff - import { withResponsiveComponent } from 'atomic-layout' + import { makeResponsive } from 'atomic-layout'

    const Image = styled.img``

    • export default withResponsiveComponent(Image)
    • export default makeResponsive(Image)

    <Image src="small.png" srcMd="large.png" />

Features

  • Adds a new query() utility function for shorthand composition of inline media queries aligned with your Layout options:

    :::js import styled from 'styled-components' import { query } from 'atomic-layout'

    const Component = styled.div@media ${query({ from: 'md' })} { background-color: red; }

Source: README.md, updated 2020-04-22