File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change 1+ const IFRAME_ATTRS = {
2+ height : 20 ,
3+ width : 100 ,
4+ } as const ;
5+
6+ const getSrcUrl = ( type : 'star' | 'fork' ) =>
7+ `https://ghbtns.com/github-btn.html?user=mkosir&repo=typescript-style-guide&type=${ type } &count=true&size=small` as const ;
8+
19export const GithubStats = ( ) => {
210 return (
311 < div className = "flex items-center gap-0.5" >
4- < iframe
5- className = "mr-10 md:mr-40 min-[997px]:mr-0" // Adjust because of swizzling - src/theme/NavbarItem/ComponentTypes.tsx
6- height = { 20 }
7- src = "https://ghbtns.com/github-btn.html?user=mkosir&repo=typescript-style-guide&type=star&count=true&size=small"
8- width = { 100 }
9- />
10- < iframe
11- className = "hidden min-[997px]:inline"
12- height = { 20 }
13- src = "https://ghbtns.com/github-btn.html?user=mkosir&repo=typescript-style-guide&type=fork&count=true&size=small"
14- width = { 100 }
15- />
12+ < iframe { ...IFRAME_ATTRS } className = "mr-10 md:mr-40 min-[997px]:mr-0" src = { getSrcUrl ( 'star' ) } />
13+ < iframe { ...IFRAME_ATTRS } className = "hidden min-[997px]:inline" src = { getSrcUrl ( 'fork' ) } />
1614 </ div >
1715 ) ;
1816} ;
You can’t perform that action at this time.
0 commit comments