Skip to content
Advertisement

How to position a real Docx file in a Material CardMedia

I have a Codesandbox

I have this app that displays different files like jpg, mp4 or now docx files. I can’t make docx file position so it look good but jpg or mp4 is working OK.

Try it just open a doxc file.

In file FileContentRenderer.jsx here below I use switch case and n open Component needed like docx-viewer.jsx

JavaScript

I think the problem is css something. I have tried so much and think I missed something

enter image description here

enter image description here

Advertisement

Answer

Replace your return block with following block in your docx-viewer.jsx.

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement