I hereby claim:
- I am DonnieWest on github.
- I am donniewest (https://keybase.io/donniewest) on keybase.
- I have a public key whose fingerprint is 445C F588 8F03 3CB9 0D78 CF73 859A 3318 2395 673D
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// __tests__/Link.react-test.js | |
import React from 'react'; | |
import Link from '../Link.react'; | |
import renderer from 'react-test-renderer'; | |
test('Link changes the class when hovered', () => { | |
const component = renderer.create( | |
<Link page="http://www.facebook.com">Facebook</Link> | |
); | |
let tree = component.toJSON(); |
// __tests__/CheckboxWithLabel-test.js | |
import React from 'react'; | |
import {shallow} from 'enzyme'; | |
import CheckboxWithLabel from '../CheckboxWithLabel'; | |
it('CheckboxWithLabel changes the text after click', () => { | |
// Render a checkbox with label in the document | |
const checkbox = shallow( | |
<CheckboxWithLabel labelOn="On" labelOff="Off" /> |
Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.
Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache
as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.
Check the gist's comments for any further tips and instructions, especially if you are running into problems!
Results after following the guide as of 11.01.2017 13:08:
{ | |
"compilerOptions": { | |
"target": "es2017", | |
"module": "es6", | |
"jsx": "preserve" | |
}, | |
"typeAcquisition": { | |
"enable": true | |
} | |
} |
// routes.js | |
const routes = [ | |
{ | |
path: '/', | |
component: Home, | |
exact: true | |
}, | |
{ | |
path: '/gists', | |
component: Gists |
let s:formatprg = findfile('node_modules/.bin/prettier-eslint', '.;') | |
if !executable(s:formatprg) | |
let s:formatprg = findfile('node_modules/.bin/prettier', '.;') | |
endif | |
if !executable(s:formatprg) | |
let s:formatprg = exepath('prettier-eslint') | |
endif |
if exists('*matchstrpos') | |
function! s:matchstrpos(expr, pattern) abort | |
return matchstrpos(a:expr, a:pattern) | |
endfunction | |
else | |
function! s:matchstrpos(expr, pattern) abort | |
return [matchstr(a:expr, a:pattern), match(a:expr, a:pattern), matchend(a:expr, a:pattern)] | |
endfunction | |
endif |
// Adds a lovely fade in of the modal | |
// and a gentle slide-down of the modal content | |
class Demo extends React.Component { | |
state = { showDialog: false }; | |
render() { | |
return ( | |
<div> | |
<button onClick={() => this.setState({ showDialog: true })}> | |
Show Dialog | |
</button> |