Commit c0e6d63b authored by Isabella Skořepová's avatar Isabella Skořepová
Browse files

JSX everywhere

parent 7f85d383
Pipeline #1033 passed with stage
in 2 minutes and 7 seconds
......@@ -2,6 +2,17 @@ module.exports = {
presets: [
'@babel/preset-env',
'@babel/preset-typescript',
'@babel/preset-react',
['@babel/preset-react', { pragma: 'jsx' }],
],
plugins: [
[
'auto-import',
{
declarations: [
{ default: 'React', path: 'react' },
{ members: ['jsx'], path: '@emotion/react' },
],
},
],
],
}
......@@ -2790,6 +2790,16 @@
"resolve": "^1.12.0"
}
},
"babel-plugin-auto-import": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/babel-plugin-auto-import/-/babel-plugin-auto-import-1.0.5.tgz",
"integrity": "sha512-U/TmCczhGEU9l65yKVdKMGP0bNlWUpulFaaRMcNaVwCRSgjfnASdwZUVrHdKbVW1EV02iR0JtO6J96aTHB9NXw==",
"dev": true,
"requires": {
"@babel/core": "^7.2.2",
"logical-not": "^1.0.0"
}
},
"babel-plugin-dynamic-import-node": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz",
......@@ -6580,6 +6590,12 @@
}
}
},
"logical-not": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/logical-not/-/logical-not-1.0.0.tgz",
"integrity": "sha512-l3X5Sf25wwZkprKfrfJ2YjCcxkNnitMvuqoVPAFNz1xpAMG7B4CkdELK19hafcR8K9fcUs0K0LkzZ62U+xdHpA==",
"dev": true
},
"lolex": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/lolex/-/lolex-4.2.0.tgz",
......
import React, { PropsWithChildren } from 'react'
import { SymbolSearch, SymbolMenu, SymbolFacebook } from './svgs'
import { Search } from './search'
import { Html } from './html'
import { css } from '@emotion/react'
const hideOnSmallAndUp = css`
display: none;
@media (max-width: 300px) {
display: block;
}
`
export function BaseBody({
config,
......@@ -25,7 +32,7 @@ export function BaseBody({
</a>
<div style={{ zIndex: 2 }} className="brand-logo">
<a id="logo-container" href="/tag/vse/1/">
<img className="hide-on-small-and-up" src="/theme/icon56.png" />
<img css={hideOnSmallAndUp} src="/theme/icon56.png" />
<img
className="hide-on-med-and-up hide-on-ultra-small"
src="/theme/logo56.png"
......
/** @jsx React.createElement */
import React from 'react'
import ReactDOM from 'react-dom/server'
import { CacheProvider } from '@emotion/react'
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment