diff --git a/src/lib/components/Contact.svelte b/src/lib/components/Contact.svelte index 96e009f..e456c58 100644 --- a/src/lib/components/Contact.svelte +++ b/src/lib/components/Contact.svelte @@ -3,16 +3,45 @@ import LinkElement from './LinkElement.svelte'; import { contactsById } from '$lib/contacts'; - const activeContacts = ['email', 'school', 'github', 'twitter', 'linkedin']; - const displayContacts = activeContacts - .map((id) => contactsById[id]) - .filter((c) => c !== undefined); + let { + variant = 'icon-only', + showLinks = true + }: { + variant?: 'icon-only' | 'labeled'; + showLinks?: boolean; + } = $props(); + + let activeContacts = $derived( + variant === 'icon-only' + ? ['email', 'school', 'github', 'twitter', 'linkedin'] + : ['home', 'email', 'github', 'twitter', 'linkedin', 'school'] + ); + + let displayContacts = $derived( + activeContacts.map((id) => contactsById[id]).filter((c) => c !== undefined) + ); -