11import React from 'react' ;
22import { Link } from 'react-router-dom' ;
3- import styled , { keyframes } from 'styled-components' ;
3+ import styled , { css , keyframes } from 'styled-components' ;
44
55import theme from 'common/theme' ;
66
@@ -24,41 +24,40 @@ const backward = keyframes`
2424 100%{background- position: 0% 50%}
2525` ;
2626
27- const styles = props =>
28- `
27+ const styles = css `
2928 transition: 0.3s ease all;
3029 animation- name: ${ backward } ;
3130 animation- duration: 300ms;
3231 animation- timing- function: ease;
3332
3433 bor der: none;
3534 outline: none;
36- ${ getBackgroundColor ( props ) } ;
35+ ${ props => getBackgroundColor ( props ) } ;
3736 background- size: 720%;
3837
3938 bor der- radius: 4px;
4039
4140 font- size: 1.125rem;
4241 text- align: center;
43- color: ${ getColor ( props ) } ;
42+ color : ${ props => getColor ( props ) } ;
4443 font- weight: 300;
45- ${ ! props . disabled && `box-shadow: 0 3px 3px rgba(0, 0, 0, 0.5);` } ;
46- width: ${ props . block ? '100%' : 'inherit' } ;
44+ ${ props => ! props . disabled && `box-shadow: 0 3px 3px rgba(0, 0, 0, 0.5);` } ;
45+ width: ${ props => ( props . block ? '100%' : 'inherit' ) } ;
4746
48- ${ ( ( ) => {
47+ ${ props => ( ) => {
4948 if ( props . small ) {
5049 return `
5150 padding: 0.5rem 0.75rem;
5251 font-size: 0.875rem;
5352 ` ;
5453 }
5554 return 'padding: 0.65rem 2.25rem;' ;
56- } ) ( ) }
55+ } }
5756
5857 user- select: none;
5958 text- decor ation: none;
6059
61- ${ ! props . disabled && `
60+ ${ props => ! props . disabled && `
6261 cursor: pointer;
6362 &:hover {
6463 animation-name: ${ forward } ;
0 commit comments