:package: Modular responsive component
Fixes:
Features:
useContainerQuery
- 🙇 @mayank23Fixes:
How embarrassing 🤦
We were overzealous with the UNSAFE_
prefixes in the prior patch release. This change removes the prefix from componentDidUpdate
Thanks to @trevdor for the PR!
This is some cleanup to get CircleCI build and tests running again after a bit of a hiatus.
Also, cleaning up some links in the README to reflect that the project is now under its own org in github.
<ContainerQuery/>
API, new query
value is not honored.As title :D thanks @sammkj
initialSize
new props to compute the container query in the initial rendering (details please checkout README).initialSize
we are now better supporting server side render (thanks to @jesstelford)!Now below should work just like pre 0.7.x
class MyComponent extends Component {
render() {
return (
<div className={classnames('container', this.props.containerQuery)}>
<div className='box'>the box</div>
</div>
);
}
}
const query = {
'width-between-400-and-599': {
minWidth: 400,
maxWidth: 599
},
'width-larger-than-600': {
minWidth: 600,
}
};
const HigherOrderComponent = applyContainerQuery(MyComponent, query);