mirror of
https://github.com/netzbegruenung/jitsi-meet-electron.git
synced 2024-05-05 18:23:41 +02:00
39 lines
713 B
JavaScript
39 lines
713 B
JavaScript
|
// @flow
|
||
|
|
||
|
import Toggle from '@atlaskit/toggle';
|
||
|
|
||
|
import React, { Component } from 'react';
|
||
|
|
||
|
import { Label, ToggleContainer } from '../styled';
|
||
|
|
||
|
type Props = {
|
||
|
|
||
|
/**
|
||
|
* Label to show for toggle.
|
||
|
*/
|
||
|
label: string;
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* Toggles Buttons with label.
|
||
|
*/
|
||
|
class ToggleWithLabel extends Component<Props, *> {
|
||
|
/**
|
||
|
* Render function of component.
|
||
|
*
|
||
|
* @returns {ReactElement}
|
||
|
*/
|
||
|
render() {
|
||
|
return (
|
||
|
<ToggleContainer>
|
||
|
<Toggle
|
||
|
size = 'large'
|
||
|
{ ...this.props } />
|
||
|
<Label>{ this.props.label }</Label>
|
||
|
</ToggleContainer>
|
||
|
);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default ToggleWithLabel;
|