diff --git a/src/components/selectPkgManager.svelte b/src/components/selectPkgManager.svelte new file mode 100644 index 0000000..a6ca2de --- /dev/null +++ b/src/components/selectPkgManager.svelte @@ -0,0 +1,40 @@ + + + + + {#if managers[pkg]} + {@const { Icon, label } = managers[pkg]} + + {label} + {/if} + + + {#each Object.entries(managers) as [value, { Icon, label }]} + pkgManager.set(value as PackageManager)} + > + + {label} + + {/each} + + diff --git a/src/components/addToFavorite.svelte b/src/components/svgs/addToFavorite.svelte similarity index 99% rename from src/components/addToFavorite.svelte rename to src/components/svgs/addToFavorite.svelte index 129b679..7d3fabe 100644 --- a/src/components/addToFavorite.svelte +++ b/src/components/svgs/addToFavorite.svelte @@ -1,8 +1,9 @@ + +
+ + +
+
+ + + {shadcnCommand} @svgl/{svgFormatTitle} + +
diff --git a/src/components/svgs/copySvg.svelte b/src/components/svgs/copySvg.svelte index 55176dd..5ec90a2 100644 --- a/src/components/svgs/copySvg.svelte +++ b/src/components/svgs/copySvg.svelte @@ -2,6 +2,7 @@ import type { iSVG } from "@/types/svg"; // Utils: + import { cn } from "@/utils/cn"; import { clipboard } from "@/utils/clipboard"; import { getPrefixFromSvgUrl, prefixSvgIds } from "@/utils/prefixSvgIds"; import { copyToClipboard as figmaCopyToClipboard } from "@/figma/copy-to-clipboard"; @@ -15,9 +16,12 @@ // UI Components: import { toast } from "svelte-sonner"; import * as Tabs from "@/components/ui/tabs"; - import { Button } from "@/components/ui/button"; + import { Button, buttonVariants } from "@/components/ui/button"; import * as Popover from "@/components/ui/popover"; + // CLIs: + import CopyShadcnCommand from "@/components/svgs/copyShadcnCommand.svelte"; + // Templates: import { getSource } from "@/templates/getSource"; import { getVueCode } from "@/templates/getVueCode"; @@ -360,7 +364,13 @@ {#if optionsOpen} @@ -370,32 +380,37 @@ {/if} - + - + Source + shadcn/ui
- + - + - + - + - + @@ -406,6 +421,7 @@
+ + +
+ +
+