mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-18 11:57:48 +00:00
feat(new-toolbars): initial implementation
This commit is contained in:
committed by
Lyubo Marinov
parent
962df14382
commit
d93782af8a
53
react/features/toolbox/components/OverflowMenuItem.web.js
Normal file
53
react/features/toolbox/components/OverflowMenuItem.web.js
Normal file
@@ -0,0 +1,53 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React, { Component } from 'react';
|
||||
|
||||
/**
|
||||
* A React {@code Component} for displaying a link to interact with other
|
||||
* features of the application.
|
||||
*
|
||||
* @extends Component
|
||||
*/
|
||||
class OverflowMenuItem extends Component {
|
||||
/**
|
||||
* {@code OverflowMenuItem} component's property types.
|
||||
*
|
||||
* @static
|
||||
*/
|
||||
static propTypes = {
|
||||
/**
|
||||
* The icon class to use for displaying an icon before the link text.
|
||||
*/
|
||||
icon: PropTypes.string,
|
||||
|
||||
/**
|
||||
* The callback to invoke when {@code OverflowMenuItem} is clicked.
|
||||
*/
|
||||
onClick: PropTypes.func,
|
||||
|
||||
/**
|
||||
* The text to display in the {@code OverflowMenuItem}.
|
||||
*/
|
||||
text: PropTypes.string
|
||||
};
|
||||
|
||||
/**
|
||||
* Implements React's {@link Component#render()}.
|
||||
*
|
||||
* @inheritdoc
|
||||
* @returns {ReactElement}
|
||||
*/
|
||||
render() {
|
||||
return (
|
||||
<li
|
||||
className = 'overflow-menu-item'
|
||||
onClick = { this.props.onClick }>
|
||||
<span className = 'overflow-menu-item-icon'>
|
||||
<i className = { this.props.icon } />
|
||||
</span>
|
||||
{ this.props.text }
|
||||
</li>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default OverflowMenuItem;
|
||||
Reference in New Issue
Block a user