mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-16 15:47:49 +00:00
feat(prejoin_page): Add prejoin page
This commit is contained in:
committed by
Saúl Ibarra Corretgé
parent
5b53232964
commit
a45cbf41ef
51
react/features/prejoin/components/buttons/ActionButton.js
Normal file
51
react/features/prejoin/components/buttons/ActionButton.js
Normal file
@@ -0,0 +1,51 @@
|
||||
// @flow
|
||||
|
||||
import React from 'react';
|
||||
const classNameByType = {
|
||||
primary: 'prejoin-btn--primary',
|
||||
secondary: 'prejoin-btn--secondary',
|
||||
text: 'prejoin-btn--text'
|
||||
};
|
||||
|
||||
type Props = {
|
||||
|
||||
/**
|
||||
* Text of the button.
|
||||
*/
|
||||
children: React$Node,
|
||||
|
||||
/**
|
||||
* Text css class of the button.
|
||||
*/
|
||||
className?: string,
|
||||
|
||||
/**
|
||||
* The type of th button: primary, secondary, text.
|
||||
*/
|
||||
type: string,
|
||||
|
||||
/**
|
||||
* OnClick button handler.
|
||||
*/
|
||||
onClick: Function,
|
||||
};
|
||||
|
||||
/**
|
||||
* Button used for prejoin actions: Join/Join without audio/Join by phone.
|
||||
*
|
||||
* @returns {ReactElement}
|
||||
*/
|
||||
function ActionButton({ children, className, type, onClick }: Props) {
|
||||
const ownClassName = `prejoin-btn ${classNameByType[type]}`;
|
||||
const cls = className ? `${className} ${ownClassName}` : ownClassName;
|
||||
|
||||
return (
|
||||
<div
|
||||
className = { cls }
|
||||
onClick = { onClick }>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default ActionButton;
|
||||
Reference in New Issue
Block a user