-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
buy me a coffee μ§μμ μν μ€μ κ³Ό μ»΄ν¬λνΈλ₯Ό μΆκ°ν¨. κ·Έλ¬λ λ°λμ νμν κΈ°λ₯λ μλκ³ μΌλ§λ μ΄μ©ν μ§ λͺ¨λ₯΄λ μν©μμ μ€νλ € UIλ₯Ό ν΄μΉλ€κ³ νλ¨λμ΄ νλ©΄μ μΆκ°νμ§ μμ. Signed-off-by: chayeoi <[email protected]>
- Loading branch information
Showing
3 changed files
with
62 additions
and
0 deletions.
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
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,59 @@ | ||
/** @jsx jsx */ | ||
import { css, jsx } from '@emotion/core' | ||
import React from 'react' | ||
|
||
interface Props { | ||
slug: string; | ||
} | ||
|
||
const Coffee: React.FC<Props> = ({ slug }) => ( | ||
<React.Fragment> | ||
<link href="https://fonts.googleapis.com/css?family=Cookie" rel="stylesheet" /> | ||
<a | ||
css={s.root} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
href={`https://buymeacoff.ee/${slug}`} | ||
> | ||
<img | ||
css={s.image} | ||
src="https://cdn.buymeacoffee.com/buttons/bmc-new-btn-logo.svg" | ||
alt="Buy me a coffee" | ||
/> | ||
<span> | ||
Buy me a coffee | ||
</span> | ||
</a> | ||
</React.Fragment> | ||
) | ||
|
||
const s = { | ||
root: css` | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
padding: 8px 24px; | ||
border-radius: 2px; | ||
color: #ffffff; | ||
background-color: #FF813F; | ||
font-family: 'Cookie', cursive; | ||
font-size: 1.75rem; | ||
font-weight: 700; | ||
text-align: center; | ||
transition: opacity 0.4s, box-shadow 0.4s; | ||
box-shadow: 0 2px 8px 0 rgba(225,129,63,.35); | ||
:hover, :focus { | ||
color: #ffffff; | ||
opacity: 0.87; | ||
box-shadow: 0 4px 16px 0 rgba(255,129,63,.45); | ||
} | ||
`, | ||
image: css` | ||
width: 20px; | ||
height: auto; | ||
margin-right: 1rem; | ||
`, | ||
} | ||
|
||
export default Coffee | ||
|
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