Skip to content

Instantly share code, notes, and snippets.

View hpierre74's full-sized avatar
🥖

Pierre Huyghe hpierre74

🥖
View GitHub Profile
import { keyframes } from 'styled-components';
import slideInDown from 'react-animations/lib/slide-in-down';
export default {
fontFamily: 'Signika',
utils: {
// the duration is passed as parameter
slideInDown: duration => `animation: ${duration}s ${keyframes(slideInDown)};`,
},
colors: {
@hpierre74
hpierre74 / styled-anim-basic.jsx
Last active August 5, 2018 22:09
styled-components / react-animations helper
import React from 'react';
import styled, { keyframes } from 'styled-components';
const AnimatedComponent = styled.div`
animation: 1.5s ${keyframes({ from: { width: '0%' }, to: { width: '100%' } })} linear;
`;
const YourComponent = () => <AnimatedComponent>I am animated</AnimatedComponent>;
@hpierre74
hpierre74 / index.html
Last active January 17, 2017 12:54
3wa mod3 css test
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>ice</title>
</head>
<body>
<h1>!</h1>
</body>
</html>