mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
style: optimize element alignment
This commit is contained in:
parent
ca8a1b4a73
commit
5c3194f71e
@ -38,8 +38,13 @@ export default function ServerCard({
|
||||
>
|
||||
<Popover>
|
||||
<PopoverTrigger asChild>
|
||||
<section className={"flex items-center justify-start gap-2 lg:w-28"}>
|
||||
{showFlag ? <ServerFlag country_code={country_code} /> : null}
|
||||
<section
|
||||
className="grid items-center gap-2 lg:w-28"
|
||||
style={{ gridTemplateColumns: "auto 1fr auto" }}
|
||||
>
|
||||
<div className="flex min-w-[17px] items-center justify-center">
|
||||
{showFlag ? <ServerFlag country_code={country_code} /> : null}
|
||||
</div>
|
||||
<p
|
||||
className={cn(
|
||||
"break-all font-bold tracking-tight",
|
||||
@ -48,7 +53,7 @@ export default function ServerCard({
|
||||
>
|
||||
{name}
|
||||
</p>
|
||||
<span className="h-2 w-2 shrink-0 rounded-full bg-green-500"></span>
|
||||
<span className="h-2 w-2 shrink-0 rounded-full bg-green-500 self-center"></span>
|
||||
</section>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent side="top">
|
||||
@ -127,8 +132,13 @@ export default function ServerCard({
|
||||
>
|
||||
<Popover>
|
||||
<PopoverTrigger asChild>
|
||||
<section className={"flex items-center justify-start gap-2 lg:w-28"}>
|
||||
{showFlag ? <ServerFlag country_code={country_code} /> : null}
|
||||
<section
|
||||
className="grid items-center gap-2 lg:w-28"
|
||||
style={{ gridTemplateColumns: "auto 1fr auto" }}
|
||||
>
|
||||
<div className="flex items-center min-w-[17px] justify-center">
|
||||
{showFlag ? <ServerFlag country_code={country_code} /> : null}
|
||||
</div>
|
||||
<p
|
||||
className={cn(
|
||||
"break-all font-bold tracking-tight",
|
||||
@ -137,7 +147,7 @@ export default function ServerCard({
|
||||
>
|
||||
{name}
|
||||
</p>
|
||||
<span className="h-2 w-2 shrink-0 rounded-full bg-red-500"></span>
|
||||
<span className="h-2 w-2 shrink-0 rounded-full bg-red-500 self-center"></span>
|
||||
</section>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-fit p-2" side="top">
|
||||
|
Loading…
Reference in New Issue
Block a user