Skip to content

Commit

Permalink
fix: fix export of FixedRatioContainer component
Browse files Browse the repository at this point in the history
  • Loading branch information
csm-thu committed Jun 22, 2022
1 parent d9c3d69 commit fa42860
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as PropTypes from 'prop-types';
import { IconButton, makeStyles, Tooltip } from '@material-ui/core';
import { AccessTime as AccessTimeIcon, Refresh as RefreshIcon } from '@material-ui/icons';
import DashboardPlaceholder from '../Dashboard/components';
import FixedRatioContainer from '../../misc/FixedRatioContainer';
import { FixedRatioContainer } from '../../misc/FixedRatioContainer';
import { PowerBIUtils } from '@cosmotech/azure';

const useStyles = makeStyles((theme) => ({
Expand Down
4 changes: 1 addition & 3 deletions src/misc/FixedRatioContainer/FixedRatioContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const useStyles = makeStyles((theme) => ({
},
}));

const FixedRatioContainer = (props) => {
export const FixedRatioContainer = (props) => {
const { children, className, heightOffset, ratio, width } = props;
const paddingTop = `calc(${(1 / ratio) * 100}% + ${heightOffset})`;
const classes = useStyles({ paddingTop, width });
Expand Down Expand Up @@ -54,5 +54,3 @@ FixedRatioContainer.defaultProps = {
ratio: 1,
width: '100%',
};

export default FixedRatioContainer;
5 changes: 4 additions & 1 deletion src/misc/FixedRatioContainer/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
export { default } from './FixedRatioContainer';
// Copyright (c) Cosmo Tech.
// Licensed under the MIT license.

export { FixedRatioContainer } from './FixedRatioContainer';

0 comments on commit fa42860

Please sign in to comment.