--- // Equivalent of ui/dropdown-menu.html import Icon from './Icon.astro' import Avatar from './Avatar.astro' import Flag from './Flag.astro' import people from '@data/people.json' import countries from '@data/countries.json' interface Props { right?: boolean show?: boolean arrow?: boolean dark?: boolean class?: string menu?: string[] check?: boolean radio?: boolean people?: boolean flag?: boolean type?: string header?: boolean icons?: boolean badge?: boolean active?: boolean disabled?: boolean separated?: boolean } const { right, show, arrow, dark, class: className, menu, check, radio, people: showPeople, flag: showFlags, type, header, icons, badge, active, disabled, separated } = Astro.props const classes = ['dropdown-menu', right && 'dropdown-menu-end', show && 'dropdown-menu-demo', arrow && 'dropdown-menu-arrow', className] const menuItems = menu const peopleItems = (people as { id: string; full_name: string }[]).slice(0, 5) const countryItems = (countries as { name: string; flag: string }[]).slice(0, 5) ---
{ menuItems ? ( menuItems.map((item) => item === '|' ? (