UNPKG

mediasfu-reactnative

Version:
48 lines (47 loc) 1.16 kB
import React from 'react'; /** * Props for the MenuItemComponent. */ export interface MenuItemComponentOptions { /** * The name of the FontAwesome5 icon to be displayed. */ icon?: string; /** * The text to be displayed as the menu item name. */ name?: string; /** * The function to be called when the menu item is pressed. */ onPress: () => void; } /** * MenuItemComponent renders a menu item with an optional icon and text. * * @component * @param {MenuItemComponentOptions} props - The properties for the MenuItemComponent. * @returns {JSX.Element} The rendered MenuItemComponent. * * MenuItemComponent renders a menu item with an optional icon and text. * * @example * ```tsx * import React from 'react'; * import { MenuItemComponent } from 'mediasfu-reactnative'; * * function App() { * return ( * <MenuItemComponent * icon="bars" * name="Menu" * onPress={() => console.log('Menu pressed')} * /> * ); * } * * export default App; * ``` */ declare const MenuItemComponent: React.FC<MenuItemComponentOptions>; export default MenuItemComponent;