Skip to content

Commit 2329a69

Browse files
committed
created sample component with styled
1 parent 51406f0 commit 2329a69

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

src/lib/buttons/Link.js

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import styled from '@emotion/styled';
2+
// import React from 'react';
3+
// import PropTypes from 'prop-types';
4+
import { Link } from 'react-router-dom';
5+
6+
const StyledLink = styled(Link)(
7+
{
8+
'-webkit-transition': 'background 200ms ease-out, font 200ms ease-out, padding 200ms ease-out, margin 200ms ease-out',
9+
'-moz-transition': 'background 200ms ease-out, font 200ms ease-out, padding 200ms ease-out, margin 200ms ease-out',
10+
'-o-transition': 'background 200ms ease-out, font 200ms ease-out, padding 200ms ease-out, margin 200ms ease-out',
11+
'transition': 'background 200ms ease-out, font 200ms ease-out, padding 200ms ease-out, margin 200ms ease-out',
12+
display: 'inline-block',
13+
padding: '6px 12px',
14+
marginBottom: 0,
15+
fontSize: '14px',
16+
fontWeight: 700,
17+
lineHeight: '1.42857143',
18+
textAlign: 'center',
19+
whiteSpace: 'nowrap',
20+
verticalAlign: 'middle',
21+
'-ms-touch-action': 'manipulation',
22+
touchAction: 'manipulation',
23+
cursor: 'pointer',
24+
'-webkit-user-select': 'none',
25+
'-moz-user-select': 'none',
26+
'-ms-user-select': 'none',
27+
'user-select': 'none',
28+
backgroundImage: 'none',
29+
border: '1px solid transparent',
30+
borderRadius: '4px',
31+
backgroundColor: '#FA6C65',
32+
color: '#FFF',
33+
textTransform: 'uppercase',
34+
textDecoration: 'none',
35+
'&:hover, &:active': {
36+
backgroundColor: '#CF4C45',
37+
outline: 0,
38+
color: '#FFF',
39+
textDecoration: 'none',
40+
},
41+
},
42+
props => ({
43+
...props.css,
44+
}),
45+
);
46+
47+
export default StyledLink;

0 commit comments

Comments
 (0)