Skip to content

Commit 97f2883

Browse files
committed
update docusaurus
1 parent 83598cb commit 97f2883

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed
Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
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+
19
export 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&amp;repo=typescript-style-guide&amp;type=star&amp;count=true&amp;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&amp;repo=typescript-style-guide&amp;type=fork&amp;count=true&amp;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
};

0 commit comments

Comments
 (0)