Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9a515f8
commit 8c03aed
Showing
4 changed files
with
84 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from 'react'; | ||
import { BannerWrap, CloseSponsor, EmojiWrap } from './style'; | ||
|
||
export function SponsorBanner({ onCloseBanner = () => null }){ | ||
return ( | ||
<div className='row'> | ||
<div className='col p-0'> | ||
<BannerWrap href='https://google.com' target='_blank' className='alert alert-info'> | ||
Sponsored by DigitalOcean | ||
<EmojiWrap>😍</EmojiWrap> | ||
Check them out! | ||
|
||
<CloseSponsor | ||
onClick={(e) => { | ||
e.preventDefault(); | ||
onCloseBanner(); | ||
}} | ||
className='close'>×</CloseSponsor> | ||
</BannerWrap> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const BannerWrap = styled.a` | ||
margin-bottom: 0; | ||
background: #101010; | ||
color: white; | ||
border: 0; | ||
border-radius: 0; | ||
padding: 10px 15px; | ||
display: block; | ||
text-align: center; | ||
transition: all 200ms; | ||
&:hover { | ||
color: white; | ||
text-decoration: none; | ||
} | ||
`; | ||
|
||
export const EmojiWrap = styled.span` | ||
position: relative; | ||
top: 1px; | ||
margin: 0 0 0 6px; | ||
`; | ||
|
||
export const CloseSponsor = styled.span` | ||
color: white; | ||
text-shadow: none; | ||
margin-right: 15px; | ||
position: relative; | ||
top: -2px; | ||
&:hover { | ||
opacity: 1; | ||
color: white; | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters