Skip to content

Commit 8111d01

Browse files
committed
👌 IMPROVE: add view on github button to website
1 parent 923bbf3 commit 8111d01

File tree

5 files changed

+68
-4
lines changed

5 files changed

+68
-4
lines changed

demo-app/public/assets/gh-logo.png

4.17 KB
Loading

demo-app/src/App.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import Center from "./components/Center/Center";
22
import Navigation from "./components/Navigation/Navigation";
33
import ScrollSpy from "react-ui-scrollspy";
4+
import Buttons from "./components/Buttons/Buttons";
45

56
function App() {
67
return (
@@ -21,6 +22,8 @@ function App() {
2122
<h1>Green</h1>
2223
</Center>
2324
</ScrollSpy>
25+
26+
<Buttons />
2427
</div>
2528
);
2629
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import React from "react";
2+
3+
interface Props {}
4+
5+
const Buttons = (props: Props) => {
6+
return (
7+
<a
8+
rel="noreferrer"
9+
href="https://github.com/pettiboy/react-ui-scrollspy/"
10+
target="_blank"
11+
>
12+
<div className={"button button-size"}>
13+
<div style={{ marginRight: 10, marginTop: 5 }}>
14+
<img src="/assets/gh-logo.png" height={30} alt="github-logo" />
15+
</div>
16+
<div>View On Github</div>
17+
<div style={{ marginLeft: 10 }}>
18+
<svg
19+
xmlns="http://www.w3.org/2000/svg"
20+
width="16"
21+
height="16"
22+
fill="currentColor"
23+
viewBox="0 0 16 16"
24+
>
25+
<path
26+
fillRule="evenodd"
27+
d="M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z"
28+
/>
29+
<path
30+
fillRule="evenodd"
31+
d="M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z"
32+
/>
33+
</svg>
34+
</div>
35+
</div>
36+
</a>
37+
);
38+
};
39+
40+
export default Buttons;

demo-app/src/index.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,26 @@ code {
2121
padding: 30px;
2222
margin: 10px;
2323
}
24+
25+
.button {
26+
bottom: 0;
27+
right: 0;
28+
position: fixed;
29+
background-color: beige;
30+
border-radius: 15px;
31+
box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px,
32+
rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;
33+
display: flex;
34+
align-items: center;
35+
justify-content: space-around;
36+
}
37+
38+
.button-size {
39+
margin: 30px;
40+
font-size: 20px;
41+
padding: 25px 40px;
42+
}
43+
2444
a {
2545
color: black;
2646
text-decoration: none;
@@ -30,4 +50,9 @@ a {
3050
.ss-item {
3151
padding: 17px;
3252
}
53+
.button-size {
54+
margin: 20px;
55+
font-size: 17px;
56+
padding: 15px 25px;
57+
}
3358
}

dev.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,3 @@ git commit -m "🚀 RELEASE: "
2222
git commit -m "🤖 TEST: "
2323
git commit -m "‼️ BREAKING: "
2424
```
25-
26-
## TODO
27-
28-
- [ ] view on github button on website

0 commit comments

Comments
 (0)