File tree 1 file changed +13
-12
lines changed
1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ const CLink = props => {
44
44
< a
45
45
href = { href || '#' }
46
46
className = { classes }
47
+ rel = { rest . target === '_blank' && 'noopener norefferer' }
47
48
{ ...rest }
48
49
onClick = { click }
49
50
ref = { innerRef }
@@ -63,17 +64,17 @@ CLink.propTypes = {
63
64
to : PropTypes . oneOfType ( [ PropTypes . object , PropTypes . string , PropTypes . func ] )
64
65
} ;
65
66
66
- CLink . sortAttributes = ( attributesToSort ) => {
67
- const attributes = { }
68
- const linkProps = { }
69
- Object . entries ( attributesToSort || { } ) . forEach ( ( [ key , value ] ) => {
70
- if ( Object . keys ( CLink . propTypes ) . includes ( key ) ) {
71
- linkProps [ key ] = value
72
- } else {
73
- attributes [ key ] = value
74
- }
75
- } )
76
- return { linkProps, attributes }
77
- }
67
+ // CLink.sortAttributes = (attributesToSort) => {
68
+ // const attributes = {}
69
+ // const linkProps = {}
70
+ // Object.entries(attributesToSort || {}).forEach(([key, value]) => {
71
+ // if (Object.keys(CLink.propTypes).includes(key)) {
72
+ // linkProps[key] = value
73
+ // } else {
74
+ // attributes[key] = value
75
+ // }
76
+ // })
77
+ // return { linkProps, attributes }
78
+ // }
78
79
79
80
export default CLink
You can’t perform that action at this time.
0 commit comments