You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
999 B
32 lines
999 B
import React from 'react'; |
|
|
|
import './index.scss'; |
|
|
|
const maxDesktopSize = 1250; |
|
|
|
const fontSize = { |
|
desktop: { |
|
h2: window.innerWidth > maxDesktopSize ? 12 : window.innerWidth / 120, |
|
}, |
|
}; |
|
|
|
export default function PowerPoint(props){ |
|
return( |
|
<> |
|
{ |
|
window.innerWidth > 1000 ? |
|
<a href={props.data.file} id="ppt" download className="ppt-box d-flex flex-column"> |
|
<h2 style={{fontSize: fontSize.desktop.h2 }} className="d-flex align-items-center"><span></span>{props.data.title}</h2> |
|
<div></div> |
|
</a> : null |
|
} |
|
{ |
|
window.innerWidth < 1000 ? |
|
<a href={props.data.file} id="ppt" download className="mobile-ppt-box d-flex flex-column"> |
|
<h2 className="d-flex align-items-center"><span></span>{props.data.title}</h2> |
|
<div></div> |
|
</a> : null |
|
} |
|
</> |
|
); |
|
} |