import { FC } from "react"; import Badge from "../badge/badge"; import { Icon, IconType } from "../icon"; import Typography from "../typography/typography"; export interface DisplayItemProps extends React.HTMLProps { title: string; open?: boolean; selected?: boolean; dropdown?: boolean; badgeValue?: string; icon?: IconType; children?: React.ReactNode; } export const DisplayItem: FC = ({ title, badgeValue, icon, children = null, open = false, selected = false, dropdown = false, className = "", ...restProps }) => { if (children) { return <>{children}; } return (
{icon ? ( ) : (
)}
{title} {badgeValue && ( )}
{dropdown && ( )}
); }; export default DisplayItem;