From eeca1d52633a2f540ef159b863717e087a832025 Mon Sep 17 00:00:00 2001 From: Daniel Stock Date: Tue, 4 Nov 2025 17:45:48 +0100 Subject: [PATCH] Added social icon component. Fixes #3 --- .../components/ui/social-icon/SocialIcon.vue | 25 +++++++ .../js/components/ui/social-icon/index.ts | 71 +++++++++++++++++++ resources/js/pages/Customers.vue | 7 +- 3 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 resources/js/components/ui/social-icon/SocialIcon.vue create mode 100644 resources/js/components/ui/social-icon/index.ts diff --git a/resources/js/components/ui/social-icon/SocialIcon.vue b/resources/js/components/ui/social-icon/SocialIcon.vue new file mode 100644 index 0000000..6000e37 --- /dev/null +++ b/resources/js/components/ui/social-icon/SocialIcon.vue @@ -0,0 +1,25 @@ + + + \ No newline at end of file diff --git a/resources/js/components/ui/social-icon/index.ts b/resources/js/components/ui/social-icon/index.ts new file mode 100644 index 0000000..50c178c --- /dev/null +++ b/resources/js/components/ui/social-icon/index.ts @@ -0,0 +1,71 @@ +import type { VariantProps } from "class-variance-authority" +import { cva } from "class-variance-authority" + +export { default as SocialIcon } from "./SocialIcon.vue" +export type SocialIconVariant = + 'default' | + 'linkedin' | + 'xing' | + 'github' | + 'instagram' | + 'twitter' | + 'x' | + 'slack' | + 'teams' | + 'matrix' | + 'bluesky' | + 'mastodon' | + 'whatsapp' | + 'telegram' | + 'threema' + ; + +export const socialIconVariants: Record = { + default: ` + + `, + linkedin: ` + + `, + xing: ` + + `, + github: ` + + `, + instagram: ` + + `, + twitter: ` + + `, + x: ` + + `, + slack: ` + + `, + teams: ` + + `, + matrix: ` + + `, + bluesky: ` + + `, + mastodon: ` + + `, + whatsapp: ` + + `, + telegram: ` + + `, + threema: ` + + `, +} + + diff --git a/resources/js/pages/Customers.vue b/resources/js/pages/Customers.vue index 7df507e..308023f 100644 --- a/resources/js/pages/Customers.vue +++ b/resources/js/pages/Customers.vue @@ -20,6 +20,7 @@ import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip' import CustomerDialog from '@/components/CustomerDialog.vue' import { toast } from 'vue-sonner' +import { SocialIcon } from '@/components/ui/social-icon' import { AxiosError } from 'axios' const breadcrumbs: BreadcrumbItem[] = [ @@ -250,21 +251,25 @@ const call = (number: string, event: Event) => {

{{ contact.jobTitle }}

+ + + +