import React, { FC } from 'react' import { formatClassList, joinStrings } from '../../utils' interface Items { description: string, icon: string, title: string } type DropdownTypes = { className?: string, items: Items[], other?: unknown } const ROW_WRAPPER: string = ` bg-white flex flex-col flex-wrap h-32 p-2 mb-8 w-72 ` const COLUMN_WRAPPER: string = ` bg-white flex flex-col flex-wrap h-56 p-2 w-72 ` const TITLE: string = ` font-sans text-base text-bscs-gray-1000 text-left ` const DESCRIPTION: string = ` font-sans mt-2 text-bscs-gray-600 text-left text-sm ` const DESCRIPTION_BOX: string = ` cursor-pointer hover:bg-bscs-gray-100 p-6 w-72 ` const ICON: string = ` text-bscs-indigo-600 ` const Dropdown:FC = ({ className, items, ...other }: DropdownTypes) => { const descriptionBox: string = formatClassList(DESCRIPTION_BOX) const formattedColumnWrapper: string = formatClassList(COLUMN_WRAPPER) const formattedDescription: string = formatClassList(DESCRIPTION) const formattedRowWrapper: string = formatClassList(ROW_WRAPPER) const formattedTitle: string = formatClassList(TITLE) const formattedIcon: string = formatClassList(ICON) return ( <> { items.length <= 3 ?
{ items.map((item, index) => (
  {item.title}
{item.description}
)) }
:
{ items.map((item, index) => (
  {item.title}
{item.description}
)) }
} ) } export default Dropdown