blowfish/src/renderer/Layout.jsx

29 lines
757 B
React
Raw Normal View History

2020-02-09 03:36:19 +01:00
import React from 'react'
import PropTypes from 'prop-types'
import posed, { PoseGroup } from 'react-pose'
import shortid from 'shortid'
import { defaultAnimation } from './components/Animations'
import Titlebar from './components/Titlebar'
import styles from './Layout.module.css'
2020-03-23 01:28:19 +01:00
import Update from './components/Update'
2020-02-09 03:36:19 +01:00
const Animation = posed.div(defaultAnimation)
export default function Layout({ children }) {
return (
2020-02-25 15:16:44 +01:00
<>
{process.platform === 'darwin' && <Titlebar />}
<div className={styles.app}>
2020-03-23 01:28:19 +01:00
<Update />
2020-02-25 15:16:44 +01:00
<PoseGroup animateOnMount>
<Animation key={shortid.generate()}>{children}</Animation>
</PoseGroup>
</div>
</>
2020-02-09 03:36:19 +01:00
)
}
Layout.propTypes = {
children: PropTypes.any.isRequired
}