UNPKG

twreporter-react

Version:

React-Redux site for The Reporter Foundation in Taiwan

75 lines (62 loc) 1.93 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _menuFactory = require('../menuFactory'); var _menuFactory2 = _interopRequireDefault(_menuFactory); var styles = { svg: { pathInitial: 'M-1,0h101c0,0-97.833,153.603-97.833,396.167C2.167,627.579,100,800,100,800H-1V0z', pathOpen: 'M-1,0h101c0,0,0-1,0,395c0,404,0,405,0,405H-1V0z', animate: function animate(path) { path.animate({ path: this.pathOpen }, 400, window.mina.easeinout); } }, morphShape: function morphShape(isOpen, width, right) { return { position: 'fixed', width: 120, height: '100%', right: right ? 'inherit' : 0, left: right ? 0 : 'inherit', transform: right ? 'rotateY(180deg)' : '' }; }, menuWrap: function menuWrap(isOpen, width, right) { return { transform: isOpen ? 'translate3d(0, 0, 0)' : right ? 'translate3d(100%, 0, 0)' : 'translate3d(-100%, 0, 0)', transition: 'all 0.3s' }; }, menu: function menu(isOpen, width, right) { return { position: 'fixed', right: right ? 0 : 'inherit', width: 'calc(100% - 120px)', whiteSpace: 'nowrap', boxSizing: 'border-box' }; }, itemList: function itemList(isOpen, width, right) { if (right) { return { position: 'relative', left: '-110px' }; } }, pageWrap: function pageWrap(isOpen, width, right) { return { transform: isOpen ? '' : right ? 'translate3d(-100px, 0, 0)' : 'translate3d(100px, 0, 0)', transition: isOpen ? 'all 0.3s' : 'all 0.3s 0.1s' }; }, outerContainer: function outerContainer(isOpen) { return { overflow: isOpen ? '' : 'hidden' }; } }; exports['default'] = (0, _menuFactory2['default'])(styles); module.exports = exports['default'];