bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/webcam/webcam-graphql/drop-areas/component.tsx
João Victor 7297778746 fix: tweak video-streams typings (Part 1)
- Tweak high-level components.
2024-05-01 16:48:12 -03:00

51 lines
987 B
TypeScript

import React from 'react';
import { defineMessages, useIntl } from 'react-intl';
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,
}
}
/>
<Styled.DropZoneBg
style={
{
...style,
zIndex: (style.zIndex as number),
}
}
>
{intl.formatMessage(intlMessages.dropZoneLabel)}
</Styled.DropZoneBg>
</>
);
};
export default DropArea;