Improve layout and styling of NewVersionTip component
Added flexbox classes to center the update tip, adjusted Chip component styles for better alignment, and set a minimum width. Spinner size and alignment were also refined for consistency.
This commit is contained in:
1 parent
0f8584b8e1
commit
6e8adad7ca
1 file changed
+4
-4
@@ -253,17 +253,17 @@ const NewVersionTip = (props: NewVersionTipProps) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip content='有新版本可用'>
|
<Tooltip content='有新版本可用'>
|
||||||
<div className="cursor-pointer" onClick={updateStatus === 'updating' ? undefined : showUpdateDialog}>
|
<div className="cursor-pointer flex items-center justify-center" onClick={updateStatus === 'updating' ? undefined : showUpdateDialog}>
|
||||||
<Chip
|
<Chip
|
||||||
size="sm"
|
size="sm"
|
||||||
color="danger"
|
color="danger"
|
||||||
variant="flat"
|
variant="flat"
|
||||||
classNames={{
|
classNames={{
|
||||||
content: "font-bold text-[10px] px-1",
|
content: "font-bold text-[10px] px-1 flex items-center justify-center",
|
||||||
base: "h-5 min-h-5"
|
base: "h-5 min-h-5 min-w-[42px]"
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{updateStatus === 'updating' ? <Spinner size="sm" color="danger" /> : 'New'}
|
{updateStatus === 'updating' ? <Spinner size="sm" color="danger" classNames={{ wrapper: "w-3 h-3" }} /> : 'New'}
|
||||||
</Chip>
|
</Chip>
|
||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|||||||
Reference in new issue
Block a user