spinner CSS tweak

This commit is contained in:
Igor Katson 2023-12-16 18:50:24 +00:00
parent 3bd1a4511f
commit d8c356a008
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
2 changed files with 12 additions and 3 deletions

View file

@ -1,6 +1,12 @@
export const Spinner = ({ label }: { label?: string }) => {
export const Spinner = ({
label,
className,
}: {
label?: string;
className?: string;
}) => {
return (
<div className="flex gap-2 items-center w-full justify-center">
<div className={`flex gap-2 items-center ${className}`}>
<svg
aria-hidden="true"
className="w-8 h-8 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600"

View file

@ -10,7 +10,10 @@ export const TorrentsList = (props: {
<div className="flex flex-col gap-2 mx-2 pb-3 sm:px-7">
{props.torrents === null ? (
props.loading ? (
<Spinner label="Loading torrent list" />
<Spinner
className="justify-center m-5"
label="Loading torrent list"
/>
) : null
) : props.torrents.length === 0 ? (
<p className="text-center">No existing torrents found.</p>