snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
This commit is contained in:
40
react/features/chat/components/web/GifMessage.tsx
Normal file
40
react/features/chat/components/web/GifMessage.tsx
Normal file
@@ -0,0 +1,40 @@
|
||||
import React from 'react';
|
||||
import { makeStyles } from 'tss-react/mui';
|
||||
|
||||
interface IProps {
|
||||
|
||||
/**
|
||||
* URL of the GIF.
|
||||
*/
|
||||
url: string;
|
||||
}
|
||||
|
||||
const useStyles = makeStyles()(() => {
|
||||
return {
|
||||
container: {
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
overflow: 'hidden',
|
||||
maxHeight: '150px',
|
||||
|
||||
'& img': {
|
||||
maxWidth: '100%',
|
||||
maxHeight: '100%',
|
||||
objectFit: 'contain',
|
||||
flexGrow: 1
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
const GifMessage = ({ url }: IProps) => {
|
||||
const { classes: styles } = useStyles();
|
||||
|
||||
return (<div className = { styles.container }>
|
||||
<img
|
||||
alt = { url }
|
||||
src = { url } />
|
||||
</div>);
|
||||
};
|
||||
|
||||
export default GifMessage;
|
||||
Reference in New Issue
Block a user