Skip to content

Commit

Permalink
🚑 Fix iFrame height
Browse files Browse the repository at this point in the history
  • Loading branch information
timmo001 committed Sep 16, 2019
1 parent 9cea390 commit eef6297
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Components/Cards/Frame.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
// @flow
import React from 'react';
import PropTypes from 'prop-types';
import { makeStyles } from '@material-ui/core/styles';
import { makeStyles, Theme } from '@material-ui/core/styles';

import { BaseProps } from './Base';

const useStyles = makeStyles(() => ({
const useStyles = makeStyles((theme: Theme) => ({
root: {
height: '100%'
},
frame: {
display: 'block',
width: '100%',
height: '100%',
height: `calc(100% - ${theme.spacing(2)}px)`,
border: 0
}
}));
Expand All @@ -25,7 +25,6 @@ function Frame(props: FrameProps) {
return (
<iframe
className={classes.frame}
style={{ height: props.card.height ? props.card.height : 'auto' }}
title={props.card.title}
src={props.card.url}
sandbox="allow-forms allow-popups allow-pointer-lock allow-same-origin allow-scripts allow-presentation"
Expand Down

0 comments on commit eef6297

Please sign in to comment.