Skip to content

Instantly share code, notes, and snippets.

View ipsips's full-sized avatar

Ivar Oja ipsips

  • Tallinn, Estonia
View GitHub Profile
/* animation loop duration: 1.5 secs */
.eq {
animation: eqBarJump 1.5s linear infinite;
transform-origin: bottom;
}
/* each bar follows the same keyframe animation but with a different delay */
.eq b:nth-child(1) { animation-delay: -1.3s; } /* bar 1 */
.eq b:nth-child(2) { animation-delay: -1.1s; } /* bar 2 */
.eq b:nth-child(3) { animation-delay: -0.8s; } /* bar 3 */
@ipsips
ipsips / SomeParentComponent.tsx
Last active April 5, 2019 05:34
1) Use `withStores` in stead of `mobx.inject` to work around the problem that injected stores must be defined as optional props individually. 2) Also export plain undecorated component for the use case of `enzyme.shallow`
import SomeReactComponent from './SomeReactComponent';
// The React component in use elsewhere: TS complains if you omit `someProp` but does not force you to provide all the required stores here as props.
<SomeReactComponent someProp="hello" />