Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: video modal responsiveness #726

Merged
merged 12 commits into from
Jan 11, 2025
8 changes: 8 additions & 0 deletions packages/react/src/views/ChatInput/ChatInput.styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ export const getCommonRecorderStyles = (theme) => {
display: flex;
margin: auto;
`,
modal: {
'@media(max-width: 768px)': {
height: '100%',
width: '100%',
maxHeight: '100%',
maxWidth: '100%',
},
},
};

return styles;
Expand Down
9 changes: 4 additions & 5 deletions packages/react/src/views/ChatInput/VideoMessageRecoder.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,18 +164,17 @@ const VideoMessageRecorder = ({ disabled }) => {
<Modal
open={state === 'recording'}
onClose={handleCancelRecordButton}
style={{
display: 'flex',
width: '28rem',
}}
css={styles.modal}
>
<video
muted
autoPlay
playsInline
ref={videoRef}
css={css`
margin-bottom: 2px;
object-fit: cover;
width: 100%;
height: 95%;
`}
/>
<Box css={styles.controller}>
Expand Down
Loading