Skip to content

Commit b2e4715

Browse files
committed
created github button
1 parent 4ad3717 commit b2e4715

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import PropTypes from "prop-types"
2+
import React from "react"
3+
4+
const GithubButton = ({ children, className, img, onClick }) => (
5+
<button className={`${className} cursor-pointer `} onClick={onClick}>
6+
<span className="flex flex-row">
7+
{children} <img src={img} alt="framework" className="w-6" />
8+
</span>
9+
</button>
10+
)
11+
12+
GithubButton.propTypes = {
13+
children: PropTypes.string,
14+
className: PropTypes.string,
15+
onClick: PropTypes.func,
16+
img: PropTypes.string,
17+
}
18+
19+
GithubButton.defaultProps = {
20+
className: `font-display rounded-px px-16`,
21+
}
22+
export default GithubButton

0 commit comments

Comments
 (0)