2024-04-20 04:34:43 +08:00
|
|
|
import React from 'react';
|
2024-05-02 03:48:12 +08:00
|
|
|
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',
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
2024-05-02 03:48:12 +08:00
|
|
|
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
|
|
|
}
|
2024-05-02 03:48:12 +08:00
|
|
|
/>
|
|
|
|
<Styled.DropZoneBg
|
|
|
|
style={
|
|
|
|
{
|
|
|
|
...style,
|
|
|
|
zIndex: (style.zIndex as number),
|
|
|
|
}
|
2024-04-20 04:34:43 +08:00
|
|
|
}
|
2024-05-02 03:48:12 +08:00
|
|
|
>
|
|
|
|
{intl.formatMessage(intlMessages.dropZoneLabel)}
|
|
|
|
</Styled.DropZoneBg>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|
2024-04-20 04:34:43 +08:00
|
|
|
|
2024-05-02 03:48:12 +08:00
|
|
|
export default DropArea;
|