This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="x-apple-disable-message-reformatting"/> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> | |
<title>Gist</title> | |
<style> | |
.personal-email { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mergeStyle from "./mergeStyle/index.js"; | |
/** | |
* A default parseHTML by Slate | |
* | |
* @param {String} html | |
* @return {Object} | |
*/ | |
function slateDOMParser(html) { | |
if (typeof DOMParser === "undefined") { | |
throw new Error( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
import * as React from "react"; | |
import getStyleProp from "desandro-get-style-property"; | |
const supportsObjectFit = !!getStyleProp("objectFit"); | |
type Props = React.ElementProps<"img">; | |
export default class Image extends React.Component<Props> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Html from 'slate-html-serializer'; | |
// import React from 'react'; | |
// import { FunctionTypes } from 'constants/editor/ViewModel'; | |
// import { Nodes } from 'components/editor'; | |
import { getEventTransfer } from 'slate-react'; | |
import { BlockTypes } from 'constants/editor'; | |
import { Block } from 'slate'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
import * as React from "react"; | |
import ResizeObserver from "resize-observer-polyfill"; | |
import invariant from "invariant"; | |
type Entry = { | |
+contentRect: { | |
+width: number, | |
+height: number |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
import React from 'react'; | |
import Icon from './Icon'; | |
import type { Props } from './Icon'; | |
export default function CheckboxIcon({ | |
checked, | |
...rest | |
}: Props & { checked: boolean }) { | |
return ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import styled, { css } from 'styled-components'; | |
import { Tooltip } from '../globals'; | |
export const InlineSvg = styled.svg` | |
position: absolute; | |
top: 0; | |
right: 0; | |
bottom: 0; | |
left: 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The `loader` prop is a Dataloader instance | |
// https://github.com/facebook/dataloader | |
class Dataloader extends React.Component { | |
state = {data: null, isLoaded: false}; | |
componentWillMount() { | |
this.prefetchData(this.props); | |
} | |
componentWillReceiveProps(nextProps) { | |
if (this.props.id !== nextProps.id || this.props.loader !== nextProps.loader) { | |
this.setState({isLoaded: false}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
require('babel-register')({ | |
ignore: /\/(build|node_modules|.svg)\//, | |
presets: ['env', 'react-app'] | |
}); | |
const universal = require('./universal'); | |
const app = express(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
import React from 'react'; | |
import styled from 'styled-components'; | |
type GlobalCssValues = 'initial' | 'inherit' | 'unset'; | |
type WrapValue = 'nowrap' | 'wrap' | 'wrap-reverse' | GlobalCssValues; | |
type JustifyValue = | |
| 'center' |
NewerOlder