bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/reload-button/component.jsx
2021-10-26 14:48:18 +00:00

27 lines
516 B
JavaScript
Executable File

import React from 'react';
import _ from 'lodash';
import Styled from './styles';
const DEBOUNCE_TIMEOUT = 5000;
const DEBOUNCE_OPTIONS = {
leading: true,
trailing: false,
};
const ReloadButtonComponent = ({
handleReload,
label,
}) => (
<Styled.Wrapper>
<Styled.ReloadButton
color="primary"
icon="refresh"
onClick={_.debounce(handleReload, DEBOUNCE_TIMEOUT, DEBOUNCE_OPTIONS)}
label={label}
hideLabel
/>
</Styled.Wrapper>
);
export default ReloadButtonComponent;