mirror of
https://github.com/jxnblk/mdx-deck.git
synced 2024-11-26 00:35:02 +03:00
Adjust styles for print
This commit is contained in:
parent
111e5f2755
commit
6c2efe83d2
@ -1,8 +1,17 @@
|
||||
import React from 'react'
|
||||
import { globalHistory } from '@reach/router'
|
||||
import { Global } from '@emotion/core'
|
||||
|
||||
const isPrintPath = () => {
|
||||
const { pathname } = globalHistory.location
|
||||
const parts = pathname.split('/')
|
||||
const path = parts[parts.length - 1]
|
||||
return path === 'print'
|
||||
}
|
||||
|
||||
export default ({ mode, modes }) => {
|
||||
if (mode === modes.PRINT) return false
|
||||
if (isPrintPath()) return false
|
||||
return (
|
||||
<Global
|
||||
styles={{
|
||||
|
Loading…
Reference in New Issue
Block a user