{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "work-experience", "title": "Work Experience", "author": "shakil-ahmed-billal ", "description": "Display work experiences with role details, company logos, and durations.", "dependencies": [ "react-markdown", "lucide-react" ], "devDependencies": [ "@tailwindcss/typography" ], "registryDependencies": [ "collapsible", "separator", "https://xhakil.vercel.app/r/typography.json" ], "files": [ { "path": "src/registry/components/work-experience/work-experience.tsx", "content": "import {\r\n BriefcaseBusinessIcon,\r\n ChevronsDownUpIcon,\r\n ChevronsUpDownIcon,\r\n} from \"lucide-react\"\r\nimport Image from \"next/image\"\r\nimport type { ComponentProps, ComponentType } from \"react\"\r\nimport ReactMarkdown from \"react-markdown\"\r\n\r\nimport {\r\n Collapsible,\r\n CollapsibleContent,\r\n CollapsibleTrigger,\r\n} from \"@/components/ui/collapsible\"\r\nimport { Separator } from \"@/components/ui/separator\"\r\nimport { cn } from \"@/lib/utils\"\r\n\r\n/**\r\n * Represents the valid keys of the `iconMap` object, used to specify the type of icon\r\n * associated with an experience position.\r\n */\r\nexport type ExperiencePositionItemType = {\r\n /** Unique identifier for the position */\r\n id: string\r\n /** The job title or position name */\r\n title: string\r\n /** The period during which the position was held (e.g., \"Jan 2020 - Dec 2021\") */\r\n employmentPeriod: string\r\n /** The type of employment (e.g., \"Full-time\", \"Part-time\", \"Contract\") */\r\n employmentType?: string\r\n /** A brief description of the position or responsibilities */\r\n description?: string\r\n /** An icon representing the position */\r\n icon?: ComponentType>\r\n /** A list of skills associated with the position */\r\n skills?: string[]\r\n /** Indicates if the position details are expanded in the UI */\r\n isExpanded?: boolean\r\n}\r\n\r\nexport type ExperienceItemType = {\r\n /** Unique identifier for the experience item */\r\n id: string\r\n /** Name of the company where the experience was gained */\r\n companyName: string\r\n /** URL or path to the company's logo image */\r\n companyLogo?: string\r\n /**\r\n * List of positions held at the company\r\n * @fumadocsHref #experiencepositionitemtype\r\n * */\r\n positions: ExperiencePositionItemType[]\r\n /** Indicates if this is the user's current employer */\r\n isCurrentEmployer?: boolean\r\n}\r\n\r\nexport type WorkExperienceProps = {\r\n className?: string\r\n /** @fumadocsHref #experienceitemtype */\r\n experiences: ExperienceItemType[]\r\n}\r\n\r\nexport function WorkExperience({\r\n className,\r\n experiences,\r\n}: WorkExperienceProps) {\r\n return (\r\n
\r\n {experiences.map((experience) => (\r\n \r\n ))}\r\n
\r\n )\r\n}\r\n\r\nexport type ExperienceItemProps = {\r\n experience: ExperienceItemType\r\n}\r\n\r\nexport function ExperienceItem({ experience }: ExperienceItemProps) {\r\n return (\r\n
\r\n
\r\n
\r\n {experience.companyLogo ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
\r\n\r\n

\r\n {experience.companyName}\r\n

\r\n\r\n {experience.isCurrentEmployer && (\r\n \r\n \r\n \r\n Current Employer\r\n \r\n )}\r\n
\r\n\r\n
\r\n {experience.positions.map((position) => (\r\n \r\n ))}\r\n
\r\n
\r\n )\r\n}\r\n\r\nexport type ExperiencePositionItemProps = {\r\n position: ExperiencePositionItemType\r\n}\r\n\r\nexport function ExperiencePositionItem({\r\n position,\r\n}: ExperiencePositionItemProps) {\r\n const ExperienceIcon = position.icon ?? BriefcaseBusinessIcon // iconMap[position.icon || \"business\"]\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n\r\n

\r\n {position.title}\r\n

\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n {position.employmentType && (\r\n <>\r\n
\r\n
Employment Type
\r\n
{position.employmentType}
\r\n
\r\n\r\n \r\n \r\n )}\r\n\r\n
\r\n
Employment Period
\r\n
{position.employmentPeriod}
\r\n
\r\n
\r\n \r\n\r\n \r\n {position.description && (\r\n \r\n {position.description}\r\n \r\n )}\r\n \r\n\r\n {Array.isArray(position.skills) && position.skills.length > 0 && (\r\n
    \r\n {position.skills.map((skill, index) => (\r\n
  • \r\n {skill}\r\n
  • \r\n ))}\r\n
\r\n )}\r\n \r\n \r\n )\r\n}\r\n\r\nfunction Prose({ className, ...props }: ComponentProps<\"div\">) {\r\n return (\r\n \r\n )\r\n}\r\n\r\nfunction Skill({ className, ...props }: ComponentProps<\"span\">) {\r\n return (\r\n \r\n )\r\n}\r\n", "type": "registry:component" } ], "docs": "https://xhakil.vercel.app/components/work-experience", "type": "registry:component" }