import React from 'react'; import { Link2 } from 'lucide-react'; import { Input } from '../ui/input'; import { Label } from '../ui/label'; import Typography from '../ui/Typography'; import { SOCIAL_PLATFORMS } from '../../../shared/schemas/hcs10'; interface SocialLinksManagerProps { value?: { twitter?: string; github?: string; website?: string; }; onChange: (value: { twitter?: string; github?: string; website?: string; }) => void; disabled?: boolean; error?: string; } /** * Simple form for managing social links */ export function SocialLinksManager({ value = {}, onChange, disabled = false, }: SocialLinksManagerProps) { const handleChange = ( platform: 'twitter' | 'github' | 'website', url: string ) => { onChange({ ...value, [platform]: url || undefined, }); }; return (
{SOCIAL_PLATFORMS.map((platform) => (
handleChange( platform.value as keyof typeof value, e.target.value ) } placeholder={platform.placeholder} disabled={disabled} className='mt-1' />
))}
Add social links to help users connect with you
); }