bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/webcam/drop-areas/component.tsx

51 lines
987 B
TypeScript
Raw Normal View History

2024-04-20 04:34:43 +08:00
import React from 'react';
import { defineMessages, useIntl } from 'react-intl';
2024-04-20 04:34:43 +08:00
import Styled from './styles';
const intlMessages = defineMessages({
dropZoneLabel: {
id: 'app.video.dropZoneLabel',
description: 'message showing where the user can drop cameraDock',
},
});
interface DropAreaProps {
id: string;
dataTest: string;
style: Record<string, unknown>;
}
const DropArea: React.FC<DropAreaProps> = ({
id,
dataTest,
style,
}) => {
const intl = useIntl();
return (
<>
<Styled.DropZoneArea
id={id}
data-test={dataTest}
style={
{
...style,
zIndex: (style.zIndex as number) + 1,
}
2024-04-20 04:34:43 +08:00
}
/>
<Styled.DropZoneBg
style={
{
...style,
zIndex: (style.zIndex as number),
}
2024-04-20 04:34:43 +08:00
}
>
{intl.formatMessage(intlMessages.dropZoneLabel)}
</Styled.DropZoneBg>
</>
);
};
2024-04-20 04:34:43 +08:00
export default DropArea;