The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/client/components/GenericMenuItem.tsx

21 lines
619 B

import { MenuItemContent, MenuItemIcon, MenuItemInput } from '@rocket.chat/fuselage';
import type { ComponentProps, ReactNode } from 'react';
import React from 'react';
export type GenericMenuItemProps = {
id?: string;
icon?: ComponentProps<typeof MenuItemIcon>['name'];
content?: ReactNode;
addon?: ReactNode;
onClick?: () => void;
};
const GenericMenuItem = ({ icon, content, addon }: GenericMenuItemProps) => (
<>
{icon && <MenuItemIcon name={icon} />}
{content && <MenuItemContent>{content}</MenuItemContent>}
{addon && <MenuItemInput>{addon}</MenuItemInput>}
</>
);
export default GenericMenuItem;