@@ -58,23 +58,24 @@ const makeRightArrowWithBackgroundIcon = () =>
5858 ) ;
5959
6060const makeCard = ( customStyles = { } , cardConfigs = [ ] , isExternalLink = false ) =>
61- _ . map ( ( { link, title, body, linkPathParams, linkQueryParams } ) =>
62- h (
61+ _ . map ( ( { link, title, body, linkPathParams, linkQueryParams } ) => {
62+ const isExternal = isExternalLink || link . startsWith ( 'http://' ) || link . startsWith ( 'https://' ) ;
63+ return h (
6364 Clickable ,
6465 {
65- href : isExternalLink ? link : Nav . getLink ( link , linkPathParams , linkQueryParams ) ,
66+ href : isExternal ? link : Nav . getLink ( link , linkPathParams , linkQueryParams ) ,
6667 style : { ...Style . elements . card . container , ...customStyles } ,
6768 hover : { boxShadow : '0 3px 7px 0 rgba(0,0,0,0.5), 0 5px 3px 0 rgba(0,0,0,0.2)' } ,
68- target : isExternalLink ? '_blank' : '' ,
69+ target : isExternal ? '_blank' : '' ,
6970 } ,
7071 [
7172 h2 ( { style : { color : colors . accent ( ) , fontSize : 18 , fontWeight : 500 , lineHeight : '22px' , marginBottom : '0.5rem' } } , title ) ,
7273 div ( { style : { lineHeight : '22px' } } , body ) ,
7374 div ( { style : { flexGrow : 1 } } ) ,
7475 makeRightArrowWithBackgroundIcon ( ) ,
7576 ]
76- )
77- ) ( cardConfigs ) ;
77+ ) ;
78+ } ) ( cardConfigs ) ;
7879
7980const makeDocLinks = _ . map ( ( { link, text } ) =>
8081 div ( { style : { marginBottom : '1rem' , fontSize : 18 } } , [
0 commit comments