2017-12-06 00:46:06 +00:00
|
|
|
import styled, { keyframes, css, injectGlobal } from 'react-emotion'
|
|
|
|
|
|
|
|
export const injectGlobalStyles = () => injectGlobal`
|
|
|
|
html, body {
|
|
|
|
padding: 3rem 1rem;
|
|
|
|
margin: 0;
|
|
|
|
background: papayawhip;
|
|
|
|
min-height: 100%;
|
|
|
|
font-family: Helvetica, Arial, sans-serif;
|
|
|
|
font-size: 24px;
|
|
|
|
}
|
|
|
|
`
|
|
|
|
|
|
|
|
export const basicStyles = css`
|
2018-12-17 16:34:32 +00:00
|
|
|
background-color: white;
|
|
|
|
color: cornflowerblue;
|
|
|
|
border: 1px solid lightgreen;
|
|
|
|
border-right: none;
|
|
|
|
border-bottom: none;
|
|
|
|
box-shadow: 5px 5px 0 0 lightgreen, 10px 10px 0 0 lightyellow;
|
|
|
|
transition: all 0.1s linear;
|
|
|
|
margin: 3rem 0;
|
|
|
|
padding: 1rem 0.5rem;
|
2017-12-06 00:46:06 +00:00
|
|
|
`
|
|
|
|
|
|
|
|
export const hoverStyles = css`
|
2018-12-17 16:34:32 +00:00
|
|
|
&:hover {
|
|
|
|
color: white;
|
|
|
|
background-color: lightgray;
|
|
|
|
border-color: aqua;
|
|
|
|
box-shadow: -15px -15px 0 0 aqua, -30px -30px 0 0 cornflowerblue;
|
|
|
|
}
|
2017-12-06 00:46:06 +00:00
|
|
|
`
|
|
|
|
export const bounce = keyframes`
|
|
|
|
from {
|
|
|
|
transform: scale(1.01);
|
|
|
|
}
|
|
|
|
to {
|
|
|
|
transform: scale(0.99);
|
|
|
|
}
|
|
|
|
`
|
|
|
|
|
|
|
|
export const Basic = styled('div')`
|
2018-12-17 16:34:32 +00:00
|
|
|
${basicStyles};
|
2017-12-06 00:46:06 +00:00
|
|
|
`
|
|
|
|
|
|
|
|
export const Combined = styled('div')`
|
2018-12-17 16:34:32 +00:00
|
|
|
${basicStyles};
|
|
|
|
${hoverStyles};
|
|
|
|
& code {
|
|
|
|
background-color: linen;
|
|
|
|
}
|
2017-12-06 00:46:06 +00:00
|
|
|
`
|
|
|
|
export const Animated = styled('div')`
|
2018-12-17 16:34:32 +00:00
|
|
|
${basicStyles};
|
|
|
|
${hoverStyles};
|
|
|
|
& code {
|
|
|
|
background-color: linen;
|
|
|
|
}
|
|
|
|
animation: ${props => props.animation} 0.2s infinite ease-in-out alternate;
|
2017-12-06 00:46:06 +00:00
|
|
|
`
|