Better components
This commit is contained in:
@@ -4,4 +4,11 @@
|
||||
|
||||
[libs]
|
||||
|
||||
[lints]
|
||||
all=warn
|
||||
unsafe-getters-setters=off
|
||||
|
||||
[options]
|
||||
include_warnings=true
|
||||
|
||||
[strict]
|
||||
|
||||
Generated
+417
-498
File diff suppressed because it is too large
Load Diff
+47
-44
@@ -1,46 +1,49 @@
|
||||
{
|
||||
"name": "chapter06",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@storybook/addon-actions": "^3.4.7",
|
||||
"@storybook/addon-links": "^3.4.7",
|
||||
"@storybook/addons": "^3.4.7",
|
||||
"@storybook/react": "^3.4.7",
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-eslint": "^8.2.3",
|
||||
"babel-runtime": "^6.26.0",
|
||||
"eslint-plugin-react": "^7.9.1",
|
||||
"react-scripts": "1.1.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^16.4.1",
|
||||
"react-app-rewire-eslint": "^0.2.3",
|
||||
"react-app-rewired": "^1.5.2",
|
||||
"react-dom": "^16.4.1"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-app-rewired start",
|
||||
"build": "react-app-rewired build",
|
||||
"test": "react-app-rewired test --env=jsdom",
|
||||
"eject": "react-app-rewired eject",
|
||||
"storybook": "start-storybook -p 9009 -s public",
|
||||
"build-storybook": "build-storybook -s public",
|
||||
"flow": "flow"
|
||||
},
|
||||
"flow-coverage-report": {
|
||||
"concurrentFiles": 1,
|
||||
"excludeGlob": [
|
||||
"node_modules/**"
|
||||
],
|
||||
"includeGlob": [
|
||||
"src/**/*.js"
|
||||
],
|
||||
"threshold": 90,
|
||||
"type": [
|
||||
"text",
|
||||
"html",
|
||||
"json"
|
||||
]
|
||||
}
|
||||
"name": "chapter06",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@storybook/addon-actions": "^3.4.7",
|
||||
"@storybook/addon-links": "^3.4.7",
|
||||
"@storybook/addons": "^3.4.7",
|
||||
"@storybook/react": "^3.4.7",
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-eslint": "^8.2.3",
|
||||
"babel-runtime": "^6.26.0",
|
||||
"eslint-plugin-react": "^7.9.1",
|
||||
"flow-bin": "^0.75.0",
|
||||
"react-scripts": "1.1.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"flow-typed": "^2.4.0",
|
||||
"react": "^16.4.1",
|
||||
"react-app-rewire-eslint": "^0.2.3",
|
||||
"react-app-rewired": "^1.5.2",
|
||||
"react-dom": "^16.4.1"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-app-rewired start",
|
||||
"build": "react-app-rewired build",
|
||||
"test": "react-app-rewired test --env=jsdom",
|
||||
"eject": "react-app-rewired eject",
|
||||
"storybook": "start-storybook -p 9009 -s public",
|
||||
"build-storybook": "build-storybook -s public",
|
||||
"flow": "flow",
|
||||
"addTypes": "flow-typed install"
|
||||
},
|
||||
"flow-coverage-report": {
|
||||
"concurrentFiles": 1,
|
||||
"excludeGlob": [
|
||||
"node_modules/**"
|
||||
],
|
||||
"includeGlob": [
|
||||
"src/**/*.js"
|
||||
],
|
||||
"threshold": 90,
|
||||
"type": [
|
||||
"text",
|
||||
"html",
|
||||
"json"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* @flow */
|
||||
|
||||
import React from "react";
|
||||
import { RegionsInformationTable } from "./components/regionsInformationTable";
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* @flow */
|
||||
|
||||
import React from "react";
|
||||
import PropTypes from "prop-types";
|
||||
import "../general.css";
|
||||
@@ -8,7 +10,7 @@ export class CountryFilterBar extends React.PureComponent {
|
||||
onSelect: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
onSelect(e) {
|
||||
onSelect(e: { target: HTMLOptionElement }) {
|
||||
this.props.onSelect(e.target.value);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* @flow */
|
||||
|
||||
import React from "react";
|
||||
import PropTypes from "prop-types";
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* @flow */
|
||||
|
||||
import React from "react";
|
||||
import PropTypes from "prop-types";
|
||||
|
||||
@@ -22,7 +24,7 @@ export class ExpandableCard extends React.PureComponent {
|
||||
if (this.state.open) {
|
||||
return (
|
||||
<div className="bordered">
|
||||
{this.props.title}{" "}
|
||||
{this.props.title}
|
||||
<div
|
||||
className="toggle"
|
||||
onClick={this.toggle.bind(this)}
|
||||
@@ -35,7 +37,7 @@ export class ExpandableCard extends React.PureComponent {
|
||||
} else {
|
||||
return (
|
||||
<div className="bordered">
|
||||
{this.props.title}{" "}
|
||||
{this.props.title}
|
||||
<div
|
||||
className="toggle"
|
||||
onClick={this.toggle.bind(this)}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* @flow */
|
||||
|
||||
import React from "react";
|
||||
|
||||
import { CountryFilterBar } from "../countryFilterBar";
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* @flow */
|
||||
|
||||
import React from "react";
|
||||
import PropTypes from "prop-types";
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* @flow */
|
||||
|
||||
import React from "react";
|
||||
import PropTypes from "prop-types";
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* @flow */
|
||||
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom";
|
||||
import "./index.css";
|
||||
|
||||
Reference in New Issue
Block a user