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

\n {experience.companyName}\n

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

\n {position.title}\n

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