0
0
mirror of https://github.com/yude-jp/yude.jp synced 2025-12-16 20:54:17 +09:00

Fix status badge position on smartphone (or narrow width devices)

This commit is contained in:
2021-06-02 15:06:27 +09:00
parent 36d18de96d
commit ca8dcf7cf5
3 changed files with 16 additions and 6 deletions

View File

@@ -15,17 +15,17 @@ const App = () => {
const status = data.members && data.members[0].status;
return (
<>
<div className="z-50 transform translate-x-96 -translate-y-10 w-5">
<div className="z-50 w-6 transform translate-y-3/4 -translate-x-full">
{
(() => {
if (status == "online"){
return <div className="z-1000 text-green-700 rounded-full bg-green-500 flex w-5 h-5"></div>
return <div className="text-green-700 rounded-full bg-green-500 flex w-6 h-6"></div>
} else if (status == "idle"){
return <div className="z-1000 text-yellow-700 rounded-full bg-green-500 flex w-5 h-5"></div>
return <div className="text-yellow-700 rounded-full bg-green-500 flex w-6 h-6"></div>
} else if (status == "dnd"){
return <div className="z-1000 text-yellow-700 rounded-full bg-red-500 flex w-5 h-5"></div>
return <div className="text-yellow-700 rounded-full bg-red-500 flex w-6 h-6"></div>
} else {
return <div className="z-1000 text-gray-700 rounded-full bg-red-500 flex w-5 h-5"></div>
return <div className="text-gray-700 rounded-full bg-red-500 flex w-6 h-6"></div>
}
})()
}