Code
Props
children
-HTML tags -Custom Components (MenuOption, MenuHeader and MenuDivider)
β
className
string
β
search
boolean
β
selectedItem
string
β
checkSelectedItems
boolean
β
removeSelectedItems
boolean
β
show
boolean
β
noContentMessage
string
β
noResultMessage
string
β
onChange
function
β
removeSelectedItem
Once an item has been clicked and selected, it will be removed from the list.
checkSelectedItem
Once an item has been clicked and selected, it will show a darker background as a visual indicator.
Children
To generate the structure required for the menu, the developer is able to insert the following components as children elements:
MenuOption
children
string
β
description
string
β
icon
boolean
β
avatar
Object {
username?: string, profilePic?: string
}
β
avatarStatus
'None' | 'Online' | 'Busy' | 'Away' | 'Ringing" | 'OnCall' | 'OnExternalCall' | 'Recovery' | 'Offline'
β
value
string
β
disabled
boolean
β
onClick
event function
β
MenuHeader
children
string
β
MenuDivider
It has no props or any configuration.
Example:
Menu generated with previous structure
onChange
At clicking one the options inside the Menu component, automatically the onChange function event is going to be triggered, allowing developer to execute a custom function that is going to receive as a default param the value of the selected item.
Components Dependency
For this component elaboration there were used the following internal components:
Menu Header
Menu Divider
Live Demo
For detailed code usage documentation, see the Storybooks for each framework below.
React
Last updated