mirror of
https://github.com/pheralb/svgl.git
synced 2025-12-29 08:01:36 +08:00
✨ Improve download SVG dialog with footer and fix title
This commit is contained in:
@@ -11,7 +11,8 @@
|
|||||||
DialogContent,
|
DialogContent,
|
||||||
DialogHeader,
|
DialogHeader,
|
||||||
DialogTitle,
|
DialogTitle,
|
||||||
DialogDescription
|
DialogDescription,
|
||||||
|
DialogFooter
|
||||||
} from '@/ui/dialog';
|
} from '@/ui/dialog';
|
||||||
import { buttonStyles } from '@/ui/styles';
|
import { buttonStyles } from '@/ui/styles';
|
||||||
import { cn } from '@/utils/cn';
|
import { cn } from '@/utils/cn';
|
||||||
@@ -104,14 +105,13 @@
|
|||||||
</DialogTrigger>
|
</DialogTrigger>
|
||||||
<DialogContent class="max-w-[630px]">
|
<DialogContent class="max-w-[630px]">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>Download {svgInfo.title}</DialogTitle>
|
<DialogTitle>Download {svgInfo.title} SVG</DialogTitle>
|
||||||
<DialogDescription>This logo has multiple options to download:</DialogDescription>
|
<DialogDescription>This logo has multiple options to download:</DialogDescription>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class={cn(
|
class={cn(
|
||||||
'flex flex-col space-y-2 mt-4 h-full',
|
'flex h-full flex-col space-y-2 pb-0.5 pt-4',
|
||||||
'md:space-y-0 md:flex-row md:space-x-2 md:items-center md:justify-center'
|
'md:flex-row md:items-center md:justify-center md:space-x-2 md:space-y-0'
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{#if typeof svgInfo.route === 'string'}
|
{#if typeof svgInfo.route === 'string'}
|
||||||
@@ -119,7 +119,7 @@
|
|||||||
<img
|
<img
|
||||||
src={isDarkTheme() ? svgInfo.route : svgInfo.route}
|
src={isDarkTheme() ? svgInfo.route : svgInfo.route}
|
||||||
alt={svgInfo.title}
|
alt={svgInfo.title}
|
||||||
class="h-8 my-4"
|
class="my-4 h-8"
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
title="Download logo"
|
title="Download logo"
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
<img
|
<img
|
||||||
src={isDarkTheme() ? svgInfo.route.dark : svgInfo.route.light}
|
src={isDarkTheme() ? svgInfo.route.dark : svgInfo.route.light}
|
||||||
alt={svgInfo.title}
|
alt={svgInfo.title}
|
||||||
class="h-10 my-4"
|
class="my-4 h-10"
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
title="Logo with light & dark variants"
|
title="Logo with light & dark variants"
|
||||||
@@ -193,7 +193,7 @@
|
|||||||
<img
|
<img
|
||||||
src={isDarkTheme() ? svgInfo.wordmark : svgInfo.wordmark}
|
src={isDarkTheme() ? svgInfo.wordmark : svgInfo.wordmark}
|
||||||
alt={svgInfo.title}
|
alt={svgInfo.title}
|
||||||
class="h-8 my-4"
|
class="my-4 h-8"
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
title="Download Wordmark logo"
|
title="Download Wordmark logo"
|
||||||
@@ -216,7 +216,7 @@
|
|||||||
<img
|
<img
|
||||||
src={isDarkTheme() ? svgInfo.wordmark.dark : svgInfo.wordmark.light}
|
src={isDarkTheme() ? svgInfo.wordmark.dark : svgInfo.wordmark.light}
|
||||||
alt={svgInfo.title}
|
alt={svgInfo.title}
|
||||||
class="h-10 my-4"
|
class="my-4 h-10"
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
title="Download Wordmark light variant"
|
title="Download Wordmark light variant"
|
||||||
@@ -266,6 +266,12 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
<DialogFooter class="mt-3 text-xs text-neutral-600 dark:text-neutral-400">
|
||||||
|
<p>
|
||||||
|
Remember to request permission from the creators for the use of the SVG. Modification is
|
||||||
|
not allowed.
|
||||||
|
</p>
|
||||||
|
</DialogFooter>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
Reference in New Issue
Block a user