Layout of Tumblr icon, added Instagram in example

This commit is contained in:
mikwee 2021-11-22 21:26:52 +02:00
parent 45f5d7ba65
commit 6949054197
3 changed files with 10 additions and 3 deletions

View file

@ -1,6 +1,7 @@
import './App.css'; import './App.css';
import {Button, ButtonGroup} from 'react-bootstrap'; import {Button, ButtonGroup} from 'react-bootstrap';
import 'bootstrap/dist/css/bootstrap.min.css'; import 'bootstrap/dist/css/bootstrap.min.css';
import { IconContext } from 'react-icons/lib';
import { BsFacebook, BsInstagram, BsTwitter, BsGithub, BsYoutube, BsLinkedin, BsPinterest, BsReddit } from 'react-icons/bs'; import { BsFacebook, BsInstagram, BsTwitter, BsGithub, BsYoutube, BsLinkedin, BsPinterest, BsReddit } from 'react-icons/bs';
import {GrTumblr} from 'react-icons/gr'; import {GrTumblr} from 'react-icons/gr';
import Tumblr from './icons/Tumblr'; import Tumblr from './icons/Tumblr';
@ -37,7 +38,7 @@ function App() {
res = <Button className="roots" id="pinterest" variant="primary" href={rootDetail.url}><BsPinterest/> {rootDetail.text}</Button> res = <Button className="roots" id="pinterest" variant="primary" href={rootDetail.url}><BsPinterest/> {rootDetail.text}</Button>
} }
else if (rootDetail.type === "tumblr") { else if (rootDetail.type === "tumblr") {
res = <Button className="roots" id="tumblr" variant="primary" href={rootDetail.url}><GrTumblr/> {rootDetail.text}</Button> res = <Button className="roots" id="tumblr" variant="primary" href={rootDetail.url}><IconContext.Provider value={{size: "1.05em"}}><GrTumblr/></IconContext.Provider> <div className="text">{rootDetail.text}</div></Button>
} }
else if (rootDetail.type === "reddit") { else if (rootDetail.type === "reddit") {
res = <Button className="roots" id="reddit" variant="primary" href={rootDetail.url}><BsReddit/> {rootDetail.text}</Button> res = <Button className="roots" id="reddit" variant="primary" href={rootDetail.url}><BsReddit/> {rootDetail.text}</Button>

View file

@ -20,6 +20,11 @@
"type": "tumblr", "type": "tumblr",
"url": "https://mikwee.tumblr.com", "url": "https://mikwee.tumblr.com",
"text": "My personal Tumblr blog" "text": "My personal Tumblr blog"
},
{
"type": "instagram",
"url": "https://instagram.com",
"text": "Instagram"
} }
] ]
} }

View file

@ -31,8 +31,9 @@ $btn-border-width: 0px;
#tumblr { #tumblr {
background-color: #35465c; background-color: #35465c;
display: flex; display: flex;
.icon { align-items: center;
flex-grow: 1; .text {
margin-left: 1mm;
} }
} }
#reddit { #reddit {