Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Languagesのパーセンテージバーの実装 #32

Closed
natsumi-h opened this issue Oct 3, 2022 · 0 comments
Closed

Languagesのパーセンテージバーの実装 #32

natsumi-h opened this issue Oct 3, 2022 · 0 comments

Comments

@natsumi-h
Copy link

パーセンテージバーの実装参考にさせて頂きました!

<div className="mt-2">
<ul className="flex flex-wrap">
{github.languages.edges.map((language) => {
return (
<li
className="mr-2 flex items-center"
key={language.node.name}
>
<span
className="h-2 w-2 rounded-full"
style={{ background: language.node.color }}
></span>
<span className="ml-[6px] text-xs font-bold">
{language.node.name}
</span>
<span className="ml-[6px] text-xs font-bold opacity-70">
{Math.round(
(language.size / github.languages.totalSize) *
1000
) / 10}
%
</span>
</li>
);
})}
</ul>
</div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants