This file contains 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 createClass from 'create-react-class' | |
import React from 'react' | |
Enzyme.configure({ adapter: new Adapter() }); | |
// Until lib-x gets updated to React 16 | |
Object.assign(React, { | |
createClass | |
}) |
This file contains 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
/* | |
Removes empty constructors (ignoring calls to super) | |
Run with codeshift: | |
jscodeshift -t ./remove-empty-constructor.js --extensions js,jsx --ignore-pattern 'node_modules' src/ | |
*/ | |
export default function transformer(file, api) { | |
const j = api.jscodeshift | |
const root = j(file.source) |
This file contains 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
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "chrome", | |
"request": "attach", | |
"name": "Attach to Chrome", |
This file contains 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
<cdk-virtual-scroll-viewport itemSize="50" class="example-viewport"> | |
<div *cdkVirtualFor="let item of items" class="example-item">{{item}}</div> | |
</cdk-virtual-scroll-viewport> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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> | |
</head> | |
<body> | |
<svg xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink"> | |
<use xlink:href="https://gist.github.com/stephenwil/b0ec7b72daecdbe562ec248ee9b4480e#file-openweather-api" x="100" y="300" /> | |
</svg> | |
</body> | |
</html> |
This file has been truncated, but you can view the full file.
This file contains 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
[ | |
{ | |
"SeedCode": "8212627", | |
"LA Name": "North Ayrshire", | |
"Centre Type": "Local Authority", | |
"School Name": "Abbey Primary School", | |
"Address 1": "Claremont Crescent", | |
"Address 2": "", | |
"Address 3": "KILWINNING", | |
"Post code": "KA13 7HG", |
This file contains 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 mapEnum = (type: any, value: any) => { | |
const x = findKey(type, (v: any,i: any, a: any) => { | |
// console.log(v,i,a,v2); | |
return v === value | |
}); | |
console.log(x); | |
return x; | |
} |
This file contains 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
export const withContext = <P extends {}>(Component: React.ComponentType<P>) => | |
class WithContext extends React.PureComponent<P & IAppContext> { | |
render() { | |
return ( | |
<AppContext.Consumer> | |
{(context: any) => <Component {...this.props} {...context} />} | |
</AppContext.Consumer> | |
); | |
} | |
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder