mirror of
https://github.com/kremalicious/blowfish.git
synced 2024-11-25 03:20:14 +01:00
29 lines
757 B
JavaScript
29 lines
757 B
JavaScript
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'
|
|
import Update from './components/Update'
|
|
|
|
const Animation = posed.div(defaultAnimation)
|
|
|
|
export default function Layout({ children }) {
|
|
return (
|
|
<>
|
|
{process.platform === 'darwin' && <Titlebar />}
|
|
<div className={styles.app}>
|
|
<Update />
|
|
<PoseGroup animateOnMount>
|
|
<Animation key={shortid.generate()}>{children}</Animation>
|
|
</PoseGroup>
|
|
</div>
|
|
</>
|
|
)
|
|
}
|
|
|
|
Layout.propTypes = {
|
|
children: PropTypes.any.isRequired
|
|
}
|