From 634592a2441d0bcf3e08b2147e59d1595f4cf11a Mon Sep 17 00:00:00 2001 From: Jaron Heard Date: Tue, 9 Apr 2019 23:19:24 -0700 Subject: [PATCH 1/4] add linting scripts to all packages --- packages/2017/package.json | 3 ++- packages/2018-disaster-resilience/package.json | 3 ++- packages/2018-example-farmers-markets/package.json | 3 ++- packages/2018-housing-affordability/package.json | 3 ++- packages/2018-local-elections/package.json | 3 ++- packages/2018-transportation-systems/package.json | 3 ++- packages/2018/package.json | 3 ++- packages/budget/package.json | 3 ++- packages/civic-babel-presets/package.json | 3 ++- packages/civic-sandbox/package.json | 3 ++- packages/component-library/package.json | 2 +- packages/dev-server/package.json | 3 +++ packages/homelessness/package.json | 3 ++- packages/housing/package.json | 3 ++- packages/mock-wrapper/package.json | 3 ++- packages/transportation/package.json | 3 ++- packages/webpack-common/package.json | 3 +++ 17 files changed, 35 insertions(+), 15 deletions(-) diff --git a/packages/2017/package.json b/packages/2017/package.json index 573fff6b3..196987bc1 100644 --- a/packages/2017/package.json +++ b/packages/2017/package.json @@ -8,7 +8,8 @@ "start:dev": "cross-env NODE_ENV=development babel-node server/dev.js", "start:prod": "yarn run build && cross-env NODE_ENV=production node server", "build": "rimraf dist && cross-env NODE_ENV=production webpack --progress --config ./webpack.config.js", - "test": "echo 'No tests!'" + "test": "echo 'No tests!'", + "lint": "eslint --fix src" }, "repository": { "type": "git", diff --git a/packages/2018-disaster-resilience/package.json b/packages/2018-disaster-resilience/package.json index 9270b6ba8..ee8f7f29c 100644 --- a/packages/2018-disaster-resilience/package.json +++ b/packages/2018-disaster-resilience/package.json @@ -27,7 +27,8 @@ "build": "rimraf dist && cross-env NODE_ENV=production webpack --config ./webpack.config.js", "start:dev": "cross-env NODE_ENV=development babel-node server", "start:prod": "cross-env NODE_ENV=production node server", - "test": "cross-env BABEL_ENV=test mocha --opts ./mocha.opts 'src/**/*.test.js'" + "test": "cross-env BABEL_ENV=test mocha --opts ./mocha.opts 'src/**/*.test.js'", + "lint": "eslint --fix src" }, "dependencies": { "@hackoregon/component-library": "^1.0.0-alpha.1c62c05f", diff --git a/packages/2018-example-farmers-markets/package.json b/packages/2018-example-farmers-markets/package.json index 010157abf..fd413a273 100644 --- a/packages/2018-example-farmers-markets/package.json +++ b/packages/2018-example-farmers-markets/package.json @@ -27,7 +27,8 @@ "build": "rimraf dist && cross-env NODE_ENV=production webpack --config ./webpack.config.js", "start:dev": "cross-env NODE_ENV=development babel-node server", "start:prod": "cross-env NODE_ENV=production node server", - "test": "cross-env BABEL_ENV=test mocha --opts ./mocha.opts 'src/**/*.test.js'" + "test": "cross-env BABEL_ENV=test mocha --opts ./mocha.opts 'src/**/*.test.js'", + "lint": "eslint --fix src" }, "dependencies": { "@hackoregon/component-library": "^1.0.0-alpha.1c62c05f", diff --git a/packages/2018-housing-affordability/package.json b/packages/2018-housing-affordability/package.json index 831dacf1a..4b6739698 100644 --- a/packages/2018-housing-affordability/package.json +++ b/packages/2018-housing-affordability/package.json @@ -27,7 +27,8 @@ "build": "rimraf dist && cross-env NODE_ENV=production webpack --config ./webpack.config.js", "start:dev": "cross-env NODE_ENV=development babel-node server", "start:prod": "cross-env NODE_ENV=production node server", - "test": "cross-env BABEL_ENV=test mocha --opts ./mocha.opts 'src/**/*.test.js'" + "test": "cross-env BABEL_ENV=test mocha --opts ./mocha.opts 'src/**/*.test.js'", + "lint": "eslint --fix src" }, "dependencies": { "@hackoregon/component-library": "^1.0.0-alpha.1c62c05f", diff --git a/packages/2018-local-elections/package.json b/packages/2018-local-elections/package.json index 6be464c06..a03272026 100644 --- a/packages/2018-local-elections/package.json +++ b/packages/2018-local-elections/package.json @@ -27,7 +27,8 @@ "build": "rimraf dist && cross-env NODE_ENV=production webpack --config ./webpack.config.js", "start:dev": "cross-env NODE_ENV=development babel-node server", "start:prod": "cross-env NODE_ENV=production node server", - "test": "cross-env BABEL_ENV=test mocha --opts ./mocha.opts 'src/**/*.test.js'" + "test": "cross-env BABEL_ENV=test mocha --opts ./mocha.opts 'src/**/*.test.js'", + "lint": "eslint --fix src" }, "dependencies": { "@hackoregon/component-library": "^1.0.0-alpha.1c62c05f", diff --git a/packages/2018-transportation-systems/package.json b/packages/2018-transportation-systems/package.json index 5a8da5259..cd77ad265 100644 --- a/packages/2018-transportation-systems/package.json +++ b/packages/2018-transportation-systems/package.json @@ -27,7 +27,8 @@ "build": "rimraf dist && cross-env NODE_ENV=production webpack --config ./webpack.config.js", "start:dev": "cross-env NODE_ENV=development babel-node server", "start:prod": "cross-env NODE_ENV=production node server", - "test": "cross-env BABEL_ENV=test mocha --opts ./mocha.opts 'src/**/*.test.js'" + "test": "cross-env BABEL_ENV=test mocha --opts ./mocha.opts 'src/**/*.test.js'", + "lint": "eslint --fix src" }, "dependencies": { "@hackoregon/component-library": "^1.0.0-alpha.1c62c05f", diff --git a/packages/2018/package.json b/packages/2018/package.json index 474f3ec60..5f431ec19 100644 --- a/packages/2018/package.json +++ b/packages/2018/package.json @@ -8,7 +8,8 @@ "start:dev": "cross-env NODE_ENV=development babel-node server/dev.js", "start:prod": "yarn run build && cross-env NODE_ENV=production node server", "build": "rimraf dist && cross-env NODE_ENV=production webpack --progress --config ./webpack.config.js", - "test": "cross-env BABEL_ENV=test mocha --opts ./mocha.opts 'src/**/*.test.js'" + "test": "cross-env BABEL_ENV=test mocha --opts ./mocha.opts 'src/**/*.test.js'", + "lint": "eslint --fix src" }, "repository": { "type": "git", diff --git a/packages/budget/package.json b/packages/budget/package.json index bc82b18d9..a78eab442 100644 --- a/packages/budget/package.json +++ b/packages/budget/package.json @@ -27,7 +27,8 @@ "build": "rimraf dist && cross-env NODE_ENV=production webpack --config ./webpack.config.js", "start:dev": "cross-env NODE_ENV=development node server", "start:prod": "cross-env NODE_ENV=production node server", - "test": "cross-env BABEL_ENV=test mocha --opts ./mocha.opts 'src/**/*.test.js'" + "test": "cross-env BABEL_ENV=test mocha --opts ./mocha.opts 'src/**/*.test.js'", + "lint": "eslint --fix src" }, "dependencies": { "@babel/polyfill": "^7.0.0", diff --git a/packages/civic-babel-presets/package.json b/packages/civic-babel-presets/package.json index 3323735da..7a167cc7d 100644 --- a/packages/civic-babel-presets/package.json +++ b/packages/civic-babel-presets/package.json @@ -5,7 +5,8 @@ "description": "Unified babel presets for civic", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 0" + "test": "echo \"Error: no test specified\" && exit 0", + "lint": "eslint --fix index.js" }, "keywords": [ "babel", diff --git a/packages/civic-sandbox/package.json b/packages/civic-sandbox/package.json index 0a08cb7aa..feba19f75 100644 --- a/packages/civic-sandbox/package.json +++ b/packages/civic-sandbox/package.json @@ -27,7 +27,8 @@ "build": "rimraf dist && cross-env NODE_ENV=production webpack --config ./webpack.config.js", "start:dev": "cross-env NODE_ENV=development babel-node server", "start:prod": "cross-env NODE_ENV=production node server", - "test": "cross-env BABEL_ENV=test mocha --opts ./mocha.opts 'src/**/*.test.js'" + "test": "cross-env BABEL_ENV=test mocha --opts ./mocha.opts 'src/**/*.test.js'", + "lint": "eslint --fix src" }, "dependencies": { "@hackoregon/component-library": "^1.0.0-alpha.1c62c05f", diff --git a/packages/component-library/package.json b/packages/component-library/package.json index 514878da5..371d5e5a7 100644 --- a/packages/component-library/package.json +++ b/packages/component-library/package.json @@ -11,7 +11,7 @@ "configure": "yarn run build", "test": "BABEL_ENV=test mocha --opts ./mocha.options ./src/**/*.test.js", "test:watch": "yarn run test -- -w", - "lint": "eslint --fix src" + "lint": "eslint --fix src stories" }, "author": "David Daniel (http://davidedaniel.github.io)", "license": "MIT", diff --git a/packages/dev-server/package.json b/packages/dev-server/package.json index 204f7b816..b67a692ae 100644 --- a/packages/dev-server/package.json +++ b/packages/dev-server/package.json @@ -7,6 +7,9 @@ "type": "git", "url": "git+https://github.com/hackoregon/civic.git" }, + "scripts": { + "lint": "eslint --fix index.js" + }, "author": "", "license": "MIT", "devDependencies": { diff --git a/packages/homelessness/package.json b/packages/homelessness/package.json index 19d3739be..5ba764153 100644 --- a/packages/homelessness/package.json +++ b/packages/homelessness/package.json @@ -29,7 +29,8 @@ "build": "rimraf dist && cross-env NODE_ENV=production webpack --config ./webpack.config.js", "start:dev": "cross-env NODE_ENV=development babel-node server", "start:prod": "cross-env NODE_ENV=production node server", - "test": "cross-env BABEL_ENV=test mocha --opts ./mocha.opts 'src/**/*.test.js'" + "test": "cross-env BABEL_ENV=test mocha --opts ./mocha.opts 'src/**/*.test.js'", + "lint": "eslint --fix src" }, "dependencies": { "@hackoregon/component-library": "^1.0.0-alpha.1c62c05f", diff --git a/packages/housing/package.json b/packages/housing/package.json index c3b9669df..f204d8b71 100644 --- a/packages/housing/package.json +++ b/packages/housing/package.json @@ -33,7 +33,8 @@ "build": "rimraf dist && cross-env NODE_ENV=production webpack --config ./webpack.config.js", "start:dev": "cross-env NODE_ENV=development babel-node server", "start:prod": "cross-env NODE_ENV=production node server", - "test": "cross-env BABEL_ENV=test mocha --opts ./mocha.opts 'src/**/*.test.js'" + "test": "cross-env BABEL_ENV=test mocha --opts ./mocha.opts 'src/**/*.test.js'", + "lint": "eslint --fix src" }, "dependencies": { "@hackoregon/component-library": "^1.0.0-alpha.1c62c05f", diff --git a/packages/mock-wrapper/package.json b/packages/mock-wrapper/package.json index e65047e74..97a6757c1 100644 --- a/packages/mock-wrapper/package.json +++ b/packages/mock-wrapper/package.json @@ -12,7 +12,8 @@ "build:esm": "babel src --out-dir es --copy-files --no-comments", "build:cjs": "babel src --out-dir dist --copy-files --no-comments", "build": "BABEL_ENV=esm yarn run build:esm && BABEL_ENV=cjs yarn run build:cjs", - "configure": "yarn run build" + "configure": "yarn run build", + "lint": "eslint --fix src" }, "license": "MIT", "dependencies": { diff --git a/packages/transportation/package.json b/packages/transportation/package.json index 611f27258..c47fb253d 100644 --- a/packages/transportation/package.json +++ b/packages/transportation/package.json @@ -27,7 +27,8 @@ "build": "rimraf dist && cross-env NODE_ENV=production webpack --config ./webpack.config.js", "start:dev": "cross-env NODE_ENV=development babel-node server", "start:prod": "cross-env NODE_ENV=production node server", - "test": "cross-env BABEL_ENV=test mocha --opts ./mocha.opts 'src/**/*.test.js'" + "test": "cross-env BABEL_ENV=test mocha --opts ./mocha.opts 'src/**/*.test.js'", + "lint": "eslint --fix src" }, "dependencies": { "@babel/polyfill": "^7.0.0", diff --git a/packages/webpack-common/package.json b/packages/webpack-common/package.json index cb544bfe0..5b4aaee32 100644 --- a/packages/webpack-common/package.json +++ b/packages/webpack-common/package.json @@ -7,6 +7,9 @@ "type": "git", "url": "git+https://github.com/hackoregon/civic.git" }, + "scripts": { + "lint": "eslint --fix index.js" + }, "author": "", "license": "MIT", "dependencies": { From 82ea291651fb4e43e90e8513206a9845783e33bd Mon Sep 17 00:00:00 2001 From: Jaron Heard Date: Thu, 11 Apr 2019 02:26:11 -0700 Subject: [PATCH 2/4] Line package - component-library --- .../src/BarChart/BarChart.js | 4 +- .../component-library/src/BaseMap/BaseMap.js | 4 +- .../src/BoundaryMap/BoundaryMap.js | 8 +- .../CivicSandboxDashboard.js | 2 +- .../src/CivicSandboxMap/CivicSandboxMap.js | 2 +- .../src/DataTable/DataTable.js | 2 +- .../src/DemoJSONLoader/DemoJSONLoader.js | 18 +-- .../src/Dropdown/Dropdown.js | 6 +- .../HorizontalBarChart/HorizontalBarChart.js | 4 +- .../component-library/src/IconMap/IconMap.js | 10 +- .../src/LineChart/LineChart.js | 4 +- .../src/MapOverlay/MapOverlay.js | 44 ++++--- .../src/MapTooltip/MapTooltip.js | 2 +- .../src/Navigation/NavRouterLink.js | 2 +- .../component-library/src/PathMap/PathMap.js | 8 +- .../src/PieChart/PieChart.js | 4 +- .../component-library/src/Sandbox/Sandbox.js | 26 +++-- .../src/Sandbox/SandboxMapLegend.js | 31 +++-- .../src/Sandbox/SandboxToggleSwitch.js | 11 ++ .../src/ScatterPlotMap/ScatterPlotMap.js | 8 +- .../src/Scatterplot/Scatterplot.js | 4 +- .../src/ScreenGridMap/ScreenGridMap.js | 6 +- .../src/StackedAreaChart/StackedAreaChart.js | 4 +- .../stories/BarChart.story.js | 6 +- .../stories/BaseMap.story.js | 6 +- .../stories/BoundaryMap.story.js | 15 +-- .../component-library/stories/Button.story.js | 17 +-- .../stories/CivicCardStack.story.js | 1 + .../stories/CivicSandboxDashboard.story.js | 65 +++-------- .../stories/CivicSandboxMap.story.js | 107 ++++-------------- .../stories/CivicStoryCard.story.js | 25 +--- .../stories/DataTable.story.js | 1 - .../stories/DropdownMenu.story.js | 10 +- .../stories/Editable.story.js | 2 + .../stories/GradientScale.story.js | 2 - .../component-library/stories/Header.story.js | 4 - .../stories/HeatMap.story.js | 5 +- .../stories/HexOverlay.story.js | 12 +- .../stories/IconMap.story.js | 22 ++-- .../stories/LandingPage.story.js | 4 - .../stories/LineChart.story.js | 2 - .../stories/MapOverlay.story.js | 31 +++-- .../component-library/stories/PDF.story.js | 1 - .../stories/PackageSelectorBox.story.js | 5 +- .../stories/PageLayout.story.js | 28 ++--- .../stories/PathMap.story.js | 16 +-- .../stories/PieChart.story.js | 3 - .../stories/Placeholder.story.js | 1 + .../stories/PullQuote.story.js | 5 - .../stories/Sandbox.story.js | 25 ++-- .../component-library/stories/Sankey.story.js | 4 - .../stories/ScatterPlotMap.story.js | 21 ++-- .../stories/Scatterplot.story.js | 1 - .../stories/ScreenGridMap.story.js | 6 +- .../component-library/stories/Slider.story.js | 10 +- .../stories/StackedAreaChart.story.js | 2 - .../stories/StoryCard.story.js | 58 ---------- .../stories/StoryLink.story.js | 1 - packages/component-library/stories/index.js | 3 +- packages/component-library/stories/shared.js | 2 + .../component-library/stories/storyStyles.js | 4 +- .../AccessibilityGuidelinesStyle.story.js | 2 +- .../styleGuideStories/ChartsStyle.story.js | 2 +- .../CivicPlatformStyle.story.js | 2 +- .../DataVisualizationStyle.story.js | 2 +- .../IconographyStyle.story.js | 2 +- .../styleGuideStories/Introduction.story.js | 4 +- .../styleGuideStories/MapsStyle.story.js | 2 +- .../styleGuideStories/MotionStyle.story.js | 2 +- .../NavigationStyle.story.js | 2 +- .../ResponsiveDesignStyle.story.js | 2 +- .../TerminologyStyle.story.js | 2 +- .../styleGuideStories/TheBrandStyle.story.js | 2 +- .../ThePlatformStyle.story.js | 2 +- .../TypographyStyleCommonSample.story.js | 5 +- .../TypographyStyleParagraphs.story.js | 14 ++- 76 files changed, 291 insertions(+), 503 deletions(-) delete mode 100644 packages/component-library/stories/StoryCard.story.js diff --git a/packages/component-library/src/BarChart/BarChart.js b/packages/component-library/src/BarChart/BarChart.js index edf4b2263..74d19b60e 100644 --- a/packages/component-library/src/BarChart/BarChart.js +++ b/packages/component-library/src/BarChart/BarChart.js @@ -108,12 +108,12 @@ const BarChart = ({ }; BarChart.propTypes = { - data: PropTypes.arrayOf(PropTypes.object), + data: PropTypes.arrayOf(PropTypes.shape({})), loading: PropTypes.bool, error: PropTypes.bool, dataKey: PropTypes.string, dataValue: PropTypes.string, - domain: PropTypes.objectOf(PropTypes.array), + domain: PropTypes.arrayOf(PropTypes.array), title: PropTypes.string, subtitle: PropTypes.string, xLabel: PropTypes.string, diff --git a/packages/component-library/src/BaseMap/BaseMap.js b/packages/component-library/src/BaseMap/BaseMap.js index c98189e65..42009e044 100644 --- a/packages/component-library/src/BaseMap/BaseMap.js +++ b/packages/component-library/src/BaseMap/BaseMap.js @@ -167,9 +167,9 @@ BaseMap.propTypes = { mapboxStyle: PropTypes.string, geocoder: PropTypes.bool, navigation: PropTypes.bool, - geocoderOptions: PropTypes.object, + geocoderOptions: PropTypes.shape({}), geocoderOnChange: PropTypes.func, - mapGLOptions: PropTypes.object, + mapGLOptions: PropTypes.shape({}), children: PropTypes.node, useContainerHeight: PropTypes.bool }; diff --git a/packages/component-library/src/BoundaryMap/BoundaryMap.js b/packages/component-library/src/BoundaryMap/BoundaryMap.js index dbc8ab2a2..8cb45f092 100644 --- a/packages/component-library/src/BoundaryMap/BoundaryMap.js +++ b/packages/component-library/src/BoundaryMap/BoundaryMap.js @@ -35,8 +35,8 @@ const BoundaryMap = props => { getFillColor={getFillColor} filled={filled} updateTriggers={{ - getLineColor: getLineColor, - getFillColor: getFillColor + getLineColor, + getFillColor }} /> @@ -45,8 +45,8 @@ const BoundaryMap = props => { }; BoundaryMap.propTypes = { - viewport: PropTypes.object, - data: PropTypes.arrayOf(PropTypes.object).isRequired, + viewport: PropTypes.shape({}), + data: PropTypes.arrayOf(PropTypes.shape({})).isRequired, opacity: PropTypes.number, getPolygon: PropTypes.func, getLineColor: PropTypes.func, diff --git a/packages/component-library/src/CivicSandboxDashboard/CivicSandboxDashboard.js b/packages/component-library/src/CivicSandboxDashboard/CivicSandboxDashboard.js index cf3fe4d1b..32c71123a 100644 --- a/packages/component-library/src/CivicSandboxDashboard/CivicSandboxDashboard.js +++ b/packages/component-library/src/CivicSandboxDashboard/CivicSandboxDashboard.js @@ -225,7 +225,7 @@ class CivicDashboard extends React.Component { } CivicDashboard.propTypes = { - data: PropTypes.arrayOf(PropTypes.object), + data: PropTypes.arrayOf(PropTypes.shape({})), children: PropTypes.node }; diff --git a/packages/component-library/src/CivicSandboxMap/CivicSandboxMap.js b/packages/component-library/src/CivicSandboxMap/CivicSandboxMap.js index feb1767f9..e357cae71 100644 --- a/packages/component-library/src/CivicSandboxMap/CivicSandboxMap.js +++ b/packages/component-library/src/CivicSandboxMap/CivicSandboxMap.js @@ -215,7 +215,7 @@ const CivicSandboxMap = props => { }; CivicSandboxMap.propTypes = { - viewport: PropTypes.object, + viewport: PropTypes.shape({}), mapLayers: PropTypes.array.isRequired, onHoverSlide: PropTypes.func, onClick: PropTypes.func, diff --git a/packages/component-library/src/DataTable/DataTable.js b/packages/component-library/src/DataTable/DataTable.js index 3de4516f9..3ba925f48 100644 --- a/packages/component-library/src/DataTable/DataTable.js +++ b/packages/component-library/src/DataTable/DataTable.js @@ -246,7 +246,7 @@ DataTable.propTypes = { key: PropTypes.string }) ).isRequired, - data: PropTypes.objectOf(PropTypes.object).isRequired + data: PropTypes.arrayOf(PropTypes.shape({})).isRequired }).isRequired, HeaderComponent: PropTypes.element, ColumnComponent: PropTypes.element, diff --git a/packages/component-library/src/DemoJSONLoader/DemoJSONLoader.js b/packages/component-library/src/DemoJSONLoader/DemoJSONLoader.js index af3ed6d1a..309b6e2a5 100644 --- a/packages/component-library/src/DemoJSONLoader/DemoJSONLoader.js +++ b/packages/component-library/src/DemoJSONLoader/DemoJSONLoader.js @@ -1,6 +1,5 @@ import React from "react"; -import { string, arrayOf } from "prop-types"; -/* eslint-disable import/no-extraneous-dependencies */ +import { string, arrayOf, node } from "prop-types"; /* global fetch */ class StorybookJSONLoader extends React.Component { @@ -12,7 +11,8 @@ class StorybookJSONLoader extends React.Component { } componentDidMount() { - const promisesArr = this.props.urls.map(url => { + const { urls } = this.props; + const promisesArr = urls.map(url => { return fetch(url) .then(response => response) .then(response => @@ -28,21 +28,23 @@ class StorybookJSONLoader extends React.Component { Promise.all(promisesArr) .then(data => this.setState({ data })) + // eslint-disable-next-line no-console .catch(error => console.log(error)); } render() { - if (this.state.data === null) { + const { data } = this.state; + const { children } = this.props; + if (data === null) { return null; } - return this.state.data.length === 1 - ? this.props.children(this.state.data[0]) - : this.props.children(this.state.data); + return data.length === 1 ? children(data[0]) : children(data); } } StorybookJSONLoader.propTypes = { - urls: arrayOf(string).isRequired + urls: arrayOf(string).isRequired, + children: node }; export default StorybookJSONLoader; diff --git a/packages/component-library/src/Dropdown/Dropdown.js b/packages/component-library/src/Dropdown/Dropdown.js index 2d3b4f009..392db6e69 100644 --- a/packages/component-library/src/Dropdown/Dropdown.js +++ b/packages/component-library/src/Dropdown/Dropdown.js @@ -42,8 +42,10 @@ Dropdown.displayName = "Dropdown"; Dropdown.propTypes = { onChange: PropTypes.func.isRequired, - options: PropTypes.array.isRequired, - value: PropTypes.any.isRequired, // eslint-disable-line react/forbid-prop-types + options: PropTypes.arrayOf( + PropTypes.shape({ value: PropTypes.string, label: PropTypes.string }) + ).isRequired, + value: PropTypes.any, // eslint-disable-line react/forbid-prop-types clearable: PropTypes.bool, searchable: PropTypes.bool, disabled: PropTypes.bool, diff --git a/packages/component-library/src/HorizontalBarChart/HorizontalBarChart.js b/packages/component-library/src/HorizontalBarChart/HorizontalBarChart.js index 0e4e50ca5..ffca97b52 100644 --- a/packages/component-library/src/HorizontalBarChart/HorizontalBarChart.js +++ b/packages/component-library/src/HorizontalBarChart/HorizontalBarChart.js @@ -166,11 +166,11 @@ const HorizontalBarChart = ({ }; HorizontalBarChart.propTypes = { - data: PropTypes.arrayOf(PropTypes.object), + data: PropTypes.arrayOf(PropTypes.shape({})), sortOrder: PropTypes.string, dataValue: PropTypes.string, dataLabel: PropTypes.string, - domain: PropTypes.objectOf(PropTypes.array), + domain: PropTypes.arrayOf(PropTypes.array), loading: PropTypes.bool, error: PropTypes.string, title: PropTypes.string, diff --git a/packages/component-library/src/IconMap/IconMap.js b/packages/component-library/src/IconMap/IconMap.js index 13fa8c8ca..8df5ef5e5 100644 --- a/packages/component-library/src/IconMap/IconMap.js +++ b/packages/component-library/src/IconMap/IconMap.js @@ -71,12 +71,12 @@ const IconMap = props => { }; IconMap.propTypes = { - viewport: PropTypes.object, - data: PropTypes.arrayOf(PropTypes.object).isRequired, + viewport: PropTypes.shape({}), + data: PropTypes.arrayOf(PropTypes.shape({})).isRequired, opacity: PropTypes.number, iconAtlas: PropTypes.string, - iconMapping: PropTypes.object, - iconSizeScale: PropTypes.function, + iconMapping: PropTypes.shape({}), + iconSizeScale: PropTypes.func, sizeScale: PropTypes.number, getPosition: PropTypes.func, getIcon: PropTypes.func, @@ -86,7 +86,7 @@ IconMap.propTypes = { onLayerClick: PropTypes.func, onClick: PropTypes.func, visible: PropTypes.bool, - tooltipInfo: PropTypes.object, + tooltipInfo: PropTypes.shape({}), x: PropTypes.number, y: PropTypes.number, onHover: PropTypes.func, diff --git a/packages/component-library/src/LineChart/LineChart.js b/packages/component-library/src/LineChart/LineChart.js index 1cb139b02..47e8df38f 100644 --- a/packages/component-library/src/LineChart/LineChart.js +++ b/packages/component-library/src/LineChart/LineChart.js @@ -173,9 +173,9 @@ LineChart.propTypes = { dataSeriesLabel: PropTypes.arrayOf( PropTypes.shape({ category: PropTypes.string, label: PropTypes.string }) ), - domain: PropTypes.objectOf(PropTypes.array), + domain: PropTypes.arrayOf(PropTypes.array), size: PropTypes.shape({ key: PropTypes.string, value: PropTypes.string }), - style: PropTypes.objectOf(PropTypes.object), + style: PropTypes.arrayOf(PropTypes.shape({})), subtitle: PropTypes.string, title: PropTypes.string, xLabel: PropTypes.string, diff --git a/packages/component-library/src/MapOverlay/MapOverlay.js b/packages/component-library/src/MapOverlay/MapOverlay.js index 3c0fa7b2b..795808962 100644 --- a/packages/component-library/src/MapOverlay/MapOverlay.js +++ b/packages/component-library/src/MapOverlay/MapOverlay.js @@ -15,21 +15,17 @@ const MapOverlay = props => { viewport, autoHighlight, extruded, - elevation, filled, - getColor, getRadius, onHover, onLayerClick, opacity, - outline, - radiusScale, strokeWidth, tooltipInfo, - visible, - wireframe, x, y, + visible, + wireframe, pickable, getElevation, getFillColor, @@ -61,6 +57,7 @@ const MapOverlay = props => { id, data, visible, + autoHighlight, extruded, opacity, filled, @@ -72,13 +69,12 @@ const MapOverlay = props => { pickable, lineWidthScale: 20, lineWidthMinPixels: strokeWidth, - autoHighlight: true, fp64: true, lightSettings: LIGHT_SETTINGS, onClick: onLayerClick, - getElevation: getElevation, - getFillColor: getFillColor, - getLineColor: getLineColor + getElevation, + getFillColor, + getLineColor }); return ( @@ -92,15 +88,33 @@ const MapOverlay = props => { MapOverlay.propTypes = { id: PropTypes.string, - mapboxStyle: PropTypes.string, - opacity: PropTypes.number, + children: PropTypes.node, + data: PropTypes.shape({}), + viewport: PropTypes.shape({}), + autoHighlight: PropTypes.bool, + extruded: PropTypes.bool, elevation: PropTypes.number, filled: PropTypes.bool, - extruded: PropTypes.bool, - stroked: PropTypes.bool, + getColor: PropTypes.func, + getRadius: PropTypes.func, + onHover: PropTypes.func, + onLayerClick: PropTypes.func, + opacity: PropTypes.number, strokeWidth: PropTypes.number, + tooltipInfo: PropTypes.bool, + x: PropTypes.number, + y: PropTypes.number, visible: PropTypes.bool, - pickable: PropTypes.bool + wireframe: PropTypes.bool, + pickable: PropTypes.bool, + getElevation: PropTypes.oneOf(PropTypes.number, PropTypes.func), + getFillColor: PropTypes.oneOf( + PropTypes.arrayOf(PropTypes.number), + PropTypes.func + ), + getLineColor: PropTypes.oneOf(PropTypes.number, PropTypes.func), + getLineWidth: PropTypes.oneOf(PropTypes.number, PropTypes.func), + stroked: PropTypes.bool }; MapOverlay.defaultProps = { diff --git a/packages/component-library/src/MapTooltip/MapTooltip.js b/packages/component-library/src/MapTooltip/MapTooltip.js index ea3bbdec1..a96ce3ef0 100644 --- a/packages/component-library/src/MapTooltip/MapTooltip.js +++ b/packages/component-library/src/MapTooltip/MapTooltip.js @@ -60,7 +60,7 @@ const MapTooltip = props => { }; MapTooltip.propTypes = { - tooltipInfo: PropTypes.object, + tooltipInfo: PropTypes.shape({}), x: PropTypes.number, y: PropTypes.number, primaryName: PropTypes.string, diff --git a/packages/component-library/src/Navigation/NavRouterLink.js b/packages/component-library/src/Navigation/NavRouterLink.js index fe5d36ed7..4cb009d29 100644 --- a/packages/component-library/src/Navigation/NavRouterLink.js +++ b/packages/component-library/src/Navigation/NavRouterLink.js @@ -50,7 +50,7 @@ const NavRouterLink = ({ path, customStyles, name }) => { NavRouterLink.propTypes = { name: PropTypes.string, path: PropTypes.string, - customStyles: PropTypes.object + customStyles: PropTypes.shape({}) }; export default NavRouterLink; diff --git a/packages/component-library/src/PathMap/PathMap.js b/packages/component-library/src/PathMap/PathMap.js index 4b84d42cd..5fdb7dc1e 100644 --- a/packages/component-library/src/PathMap/PathMap.js +++ b/packages/component-library/src/PathMap/PathMap.js @@ -68,8 +68,8 @@ const PathMap = props => { }; PathMap.propTypes = { - viewport: PropTypes.object, - data: PropTypes.arrayOf(PropTypes.object).isRequired, + viewport: PropTypes.shape({}), + data: PropTypes.arrayOf(PropTypes.shape({})).isRequired, getColor: PropTypes.func, opacity: PropTypes.number, getPath: PropTypes.func, @@ -77,10 +77,10 @@ PathMap.propTypes = { widthScale: PropTypes.number, rounded: PropTypes.bool, autoHighlight: PropTypes.bool, - highlightColor: PropTypes.array, + highlightColor: PropTypes.arrayOf(PropTypes.number), onLayerClick: PropTypes.func, visible: PropTypes.bool, - tooltipInfo: PropTypes.object, + tooltipInfo: PropTypes.shape({}), x: PropTypes.number, y: PropTypes.number, onHover: PropTypes.func, diff --git a/packages/component-library/src/PieChart/PieChart.js b/packages/component-library/src/PieChart/PieChart.js index cdd202241..87865d181 100644 --- a/packages/component-library/src/PieChart/PieChart.js +++ b/packages/component-library/src/PieChart/PieChart.js @@ -2,7 +2,7 @@ import React from "react"; import PropTypes from "prop-types"; import { VictoryPie, VictoryLabel } from "victory"; import ChartContainer from "../ChartContainer"; -import civicTheme from "../VictoryTheme/CivicVictoryTheme.js"; +import civicTheme from "../VictoryTheme/CivicVictoryTheme"; import SimpleLegend from "../SimpleLegend"; const getOrElse = (possibleValue, defaultValue) => @@ -80,7 +80,7 @@ PieChart.defaultProps = { PieChart.propTypes = { colors: PropTypes.arrayOf(PropTypes.string), - data: PropTypes.arrayOf(PropTypes.object).isRequired, + data: PropTypes.arrayOf(PropTypes.shape({})).isRequired, dataLabel: PropTypes.string, dataValue: PropTypes.string, error: PropTypes.string, diff --git a/packages/component-library/src/Sandbox/Sandbox.js b/packages/component-library/src/Sandbox/Sandbox.js index d94cfdce2..4e877c8e0 100644 --- a/packages/component-library/src/Sandbox/Sandbox.js +++ b/packages/component-library/src/Sandbox/Sandbox.js @@ -79,7 +79,7 @@ const Sandbox = ({
{ + const scale = d3 + .scaleQuantize() + .domain(d3.extent(data.slide_data.features, getPropValue)) + .range(color) + .nice(); + return scale; +}; + const SandboxMapLegend = props => { const { data, mapProps } = props; - const createEqualBins = (data, color, getPropValue) => { - const scale = d3 - .scaleQuantize() - .domain(d3.extent(data.slide_data.features, getPropValue)) - .range(color) - .nice(); - return scale; - }; - const colorScale = mapProps.scaleType === "ordinal" || mapProps.scaleType === "threshold" ? mapProps.categories @@ -55,7 +57,7 @@ const SandboxMapLegend = props => { const formatColor = arr => arr.reduce( - (acc, cur, i) => (i < 3 ? acc + cur + "," : acc + "1)"), + (acc, cur, i) => (i < 3 ? `${acc + cur},` : `${acc}1)`), "rgba(" ); @@ -72,7 +74,7 @@ const SandboxMapLegend = props => { const ticks = mapProps.scaleType === "ordinal" || mapProps.scaleType === "threshold" ? bins - : bins.reduce((a, c, i, arr) => (c[1] ? [...a, c[1]] : [...a, ""]), []); + : bins.reduce((a, c) => (c[1] ? [...a, c[1]] : [...a, ""]), []); const thousandsFormat = d3.format(".3s"); const percentFormat = d3.format(".1%"); @@ -100,7 +102,7 @@ const SandboxMapLegend = props => { const legend = mapColorsArr.map((d, i) => { return (
@@ -114,4 +116,9 @@ const SandboxMapLegend = props => { return
{legend}
; }; +SandboxMapLegend.propTypes = { + data: PropTypes.shape({}).isRequired, + mapProps: PropTypes.shape({}).isRequired +}; + export default SandboxMapLegend; diff --git a/packages/component-library/src/Sandbox/SandboxToggleSwitch.js b/packages/component-library/src/Sandbox/SandboxToggleSwitch.js index d2061f7aa..bf1beb978 100644 --- a/packages/component-library/src/Sandbox/SandboxToggleSwitch.js +++ b/packages/component-library/src/Sandbox/SandboxToggleSwitch.js @@ -1,4 +1,6 @@ +/* eslint-disable no-nested-ternary */ import React from "react"; +import PropTypes from "prop-types"; import { css } from "emotion"; const toggleStyle = css` @@ -64,6 +66,7 @@ const SandboxToggleSwitch = props => { return (
+ {/* eslint-disable-next-line */}
)) - .add(title, demoCode) - .add(altTitle, altDemo); + .add(title, demoCode); diff --git a/packages/component-library/stories/CivicCardStack.story.js b/packages/component-library/stories/CivicCardStack.story.js index a8a85f784..1b30e1692 100644 --- a/packages/component-library/stories/CivicCardStack.story.js +++ b/packages/component-library/stories/CivicCardStack.story.js @@ -1,3 +1,4 @@ +/* eslint-disable react/prop-types */ /* eslint-disable no-console */ import React from "react"; /* eslint-disable import/no-extraneous-dependencies */ diff --git a/packages/component-library/stories/CivicSandboxDashboard.story.js b/packages/component-library/stories/CivicSandboxDashboard.story.js index 926b09644..04ee5e30f 100644 --- a/packages/component-library/stories/CivicSandboxDashboard.story.js +++ b/packages/component-library/stories/CivicSandboxDashboard.story.js @@ -1,54 +1,22 @@ +/* eslint-disable no-nested-ternary */ /* eslint-disable import/no-extraneous-dependencies */ import React from "react"; -import * as d3 from "d3"; import { storiesOf } from "@storybook/react"; import { withKnobs, boolean } from "@storybook/addon-knobs"; import { checkA11y } from "@storybook/addon-a11y"; import { css } from "emotion"; -import { BaseMap } from "../src"; -import { CivicSandboxMap } from "../src"; -import { CivicSandboxDashboard } from "../src"; +import { + BaseMap, + CivicSandboxMap, + CivicSandboxDashboard, + DemoJSONLoader +} from "../src"; import { wallOfText } from "./shared"; const dashboardDescription = css` padding: 0 1% 0 5%; `; -const displayName = - CivicSandboxDashboard.displayName || "CivicSandboxDashboard"; - -class LoadData extends React.Component { - constructor(props) { - super(props); - this.state = { - foundation1: null, - slide1: null, - error: null - }; - } - - componentDidMount() { - const cmp = this; - d3.queue() - .defer(d3.json, this.props.urls[0]) - .defer(d3.json, this.props.urls[1]) - .await((error, foundation1, slide1) => { - if (error) { - cmp.setState({ error }); - } - cmp.setState({ foundation1, slide1 }); - }); - } - - render() { - if (this.state.foundation1 === null) { - return null; - } - const { foundation1, slide1 } = this.state; - return this.props.children(foundation1, slide1); - } -} - const dataURLs = [ "https://gist.githubusercontent.com/mendozaline/f78b076ce13a9fd484f6b8a004065a95/raw/ff8bd893ba1890a6f6c20265f720587f9595a9c4/pop.json", "https://gist.githubusercontent.com/mendozaline/b3a75b40c9a60781b6adc77cebb9b400/raw/fa0aa13c75bfcc2fd92ccf1f3cc612af83d5d704/010-grocery.json" @@ -102,8 +70,8 @@ const dashboardComponent = (foundationData1, slideData1) => { data: foundationData1.slide_data.features, opacity: 0.5, getPolygon: f => f.geometry.coordinates, - getLineColor: f => [0, 0, 0, 255], - getLineWidth: f => 0.5, + getLineColor: () => [0, 0, 0, 255], + getLineWidth: () => 0.5, stroked: true, getFillColor: populationGetColor, filled: true, @@ -119,8 +87,8 @@ const dashboardComponent = (foundationData1, slideData1) => { opacity: 1, filled: false, getPolygon: f => f.coordinates, - getLineColor: f => [138, 43, 226, 255], - getLineWidth: f => 45, + getLineColor: () => [138, 43, 226, 255], + getLineWidth: () => 45, lineWidthScale: 1, lineJointRounded: false }; @@ -131,8 +99,8 @@ const dashboardComponent = (foundationData1, slideData1) => { data: slideData1.slide_data.features, getPosition: f => f.geometry.coordinates, opacity: 0.9, - getColor: f => [138, 43, 226, 255], - getRadius: f => 75, + getColor: () => [138, 43, 226, 255], + getRadius: () => 75, radiusScale: 1, radiusMinPixels: 1, autoHighlight: true, @@ -246,7 +214,8 @@ const dashboardComponent = (foundationData1, slideData1) => { const dashboardInformation = (

- How has ridership changed throughout Tri-Met's service area over time? + How has ridership changed throughout Tri-Met's service area over + time?

{wallOfText}

{wallOfText}

@@ -302,9 +271,9 @@ export default () => .addDecorator(withKnobs) .addDecorator(checkA11y) .add("Simple usage", () => ( - + {(foundation1, slide1, slide2) => dashboardComponent(foundation1, slide1, slide2) } - + )); diff --git a/packages/component-library/stories/CivicSandboxMap.story.js b/packages/component-library/stories/CivicSandboxMap.story.js index 9cb59d036..4f6923cc5 100644 --- a/packages/component-library/stories/CivicSandboxMap.story.js +++ b/packages/component-library/stories/CivicSandboxMap.story.js @@ -1,74 +1,12 @@ +/* eslint-disable no-console */ +/* eslint-disable react/prop-types */ /* eslint-disable import/no-extraneous-dependencies */ import React from "react"; import { storiesOf } from "@storybook/react"; import { withKnobs, select, boolean } from "@storybook/addon-knobs"; import { action } from "@storybook/addon-actions"; import { checkA11y } from "@storybook/addon-a11y"; -import { BaseMap } from "../src"; -import { CivicSandboxMap } from "../src"; -import CivicSandboxTooltip from "../src/CivicSandboxMap/CivicSandboxTooltip"; -import { DemoJSONLoader } from "../src"; - -class LoadData extends React.Component { - constructor(props) { - super(props); - this.state = { - data: null, - error: null - }; - } - - componentDidMount() { - const cmp = this; - d3.queue() - .defer(d3.json, this.props.urls[0]) - .defer(d3.json, this.props.urls[1]) - .defer(d3.json, this.props.urls[2]) - .defer(d3.json, this.props.urls[3]) - .defer(d3.json, this.props.urls[4]) - .defer(d3.json, this.props.urls[5]) - .defer(d3.json, this.props.urls[6]) - .defer(d3.json, this.props.urls[7]) - .await( - ( - error, - foundation1, - foundation2, - foundation3, - slide1, - slide2, - slide3, - slide4, - slide5 - ) => { - if (error) { - return this.setState({ error }); - } - cmp.setState({ - data: { - foundation1, - foundation2, - foundation3, - slide1, - slide2, - slide3, - slide4, - slide5 - } - }); - } - ); - } - - render() { - if (this.state.data === null) { - return null; - } - return this.props.children(this.state.data); - } -} - -const displayName = CivicSandboxMap.displayName || "CivicSandboxMap"; +import { BaseMap, CivicSandboxMap, DemoJSONLoader } from "../src"; const dataURLs = [ "https://service.civicpdx.org/neighborhood-development/sandbox/foundations/over65/", @@ -118,8 +56,8 @@ export default () => data: foundation1.slide_data.features, opacity: 0.55, getPolygon: f => f.geometry.coordinates, - getLineColor: f => [0, 0, 0, 255], - getLineWidth: f => 0.1, + getLineColor: () => [0, 0, 0, 255], + getLineWidth: () => 0.1, stroked: true, color: colorSchemeArray, getPropValue: f => @@ -139,8 +77,8 @@ export default () => data: foundation2.slide_data.features, opacity: 0.55, getPolygon: f => f.geometry.coordinates, - getLineColor: f => [0, 0, 0, 255], - getLineWidth: f => 0.1, + getLineColor: () => [0, 0, 0, 255], + getLineWidth: () => 0.1, stroked: true, color: colorSchemeArray, getPropValue: f => @@ -162,8 +100,8 @@ export default () => data: slide1.slide_meta.boundary, opacity: 1.0, getPolygon: f => f.coordinates, - getLineColor: f => [25, 183, 170, 255], - getLineWidth: f => 45, + getLineColor: () => [25, 183, 170, 255], + getLineWidth: () => 45, filled: false }; const gardensMap = { @@ -173,10 +111,10 @@ export default () => data: slide1.slide_data.features, opacity: 1, getPolygon: f => f.geometry.coordinates, - getLineColor: f => [25, 183, 170, 255], - getLineWidth: f => 5, + getLineColor: () => [25, 183, 170, 255], + getLineWidth: () => 5, stroked: true, - getFillColor: f => [25, 183, 170, 255], + getFillColor: () => [25, 183, 170, 255], filled: true, autoHighlight: true, highlightColor: [25, 183, 170, 25] @@ -189,8 +127,8 @@ export default () => data: slide2.slide_meta.boundary, opacity: 1.0, getPolygon: f => f.coordinates, - getLineColor: f => [14, 29, 124, 255], - getLineWidth: f => 45, + getLineColor: () => [14, 29, 124, 255], + getLineWidth: () => 45, filled: false }; const bikeLanesMap = { @@ -199,9 +137,9 @@ export default () => pickable: true, data: slide2.slide_data.features, opacity: 1, - getColor: f => [14, 29, 124, 255], + getColor: () => [14, 29, 124, 255], getPath: f => f.geometry.coordinates, - getWidth: f => 25, + getWidth: () => 25, rounded: false, autoHighlight: true, highlightColor: [100, 100, 100, 100] @@ -214,8 +152,8 @@ export default () => data: slide3.slide_meta.boundary, opacity: 1.0, getPolygon: f => f.coordinates, - getLineColor: f => [255, 178, 38, 255], - getLineWidth: f => 45, + getLineColor: () => [255, 178, 38, 255], + getLineWidth: () => 45, filled: false }; const groceryMap = { @@ -225,8 +163,8 @@ export default () => data: slide3.slide_data.features, getPosition: f => f.geometry.coordinates, opacity: 0.9, - getColor: f => [255, 178, 38, 255], - getRadius: f => 50, + getColor: () => [255, 178, 38, 255], + getRadius: () => 50, radiusScale: 1, radiusMinPixels: 1, autoHighlight: true, @@ -234,7 +172,7 @@ export default () => parameters: { depthTest: false } }; - //Foundations + // Foundations const foundationOptions = { "Households with Seniors": "025-households-seniors", "Households with Children": "015-household-children" @@ -245,7 +183,7 @@ export default () => foundationOptions["Households with Seniors"] ); - //Slides + // Slides const bikeLanesSlideVisible = boolean("Bike Lanes:", true); const gardensSlideVisible = boolean("Community Gardens:", true); const grocerySlideVisible = boolean("Grocery Stores:", true); @@ -285,6 +223,7 @@ export default () => if (d.visible === true) { return d.data; } + return false; }); return ( diff --git a/packages/component-library/stories/CivicStoryCard.story.js b/packages/component-library/stories/CivicStoryCard.story.js index 7795e186b..01bdc1a3d 100644 --- a/packages/component-library/stories/CivicStoryCard.story.js +++ b/packages/component-library/stories/CivicStoryCard.story.js @@ -1,28 +1,11 @@ +/* eslint-disable react/prop-types */ /* eslint-disable no-console */ import React from "react"; /* eslint-disable import/no-extraneous-dependencies */ import { storiesOf } from "@storybook/react"; -import { withInfo } from "@storybook/addon-info"; -import { withKnobs, text, number, object, array } from "@storybook/addon-knobs"; -import { - CivicStoryCard, - Chart, - ChartData, - Pie, - HorizontalBarChart, - Collapsable -} from "../src"; -import { - getRandomValuesArray, - getColors, - randomizer, - wallOfRichText, - wallOfText -} from "./shared"; - -const labels = ["A", "B", "C", "D", "E", "F"]; -const width = 300; -const height = 300; +import { text, array } from "@storybook/addon-knobs"; +import { CivicStoryCard, HorizontalBarChart, Collapsable } from "../src"; +import { wallOfRichText, wallOfText } from "./shared"; const data = array("Data", [ { sortOrder: 1, population: 2000, label: "Labrador Retriever" }, diff --git a/packages/component-library/stories/DataTable.story.js b/packages/component-library/stories/DataTable.story.js index 8402d77d5..4b2bef879 100644 --- a/packages/component-library/stories/DataTable.story.js +++ b/packages/component-library/stories/DataTable.story.js @@ -5,7 +5,6 @@ import { withInfo } from "@storybook/addon-info"; import { DataTable } from "../src"; -const displayName = "DataTable"; const title = "Simple usage"; // const description = 'A data table.'; diff --git a/packages/component-library/stories/DropdownMenu.story.js b/packages/component-library/stories/DropdownMenu.story.js index 2f4ffd308..bc1bc6906 100644 --- a/packages/component-library/stories/DropdownMenu.story.js +++ b/packages/component-library/stories/DropdownMenu.story.js @@ -1,16 +1,12 @@ +/* eslint-disable no-console */ import React from "react"; /* eslint-disable import/no-extraneous-dependencies */ import { storiesOf } from "@storybook/react"; -import { withInfo } from "@storybook/addon-info"; import { checkA11y } from "@storybook/addon-a11y"; import { Dropdown } from "../src"; -import { storybookStyles } from "./storyStyles.js"; +import { storybookStyles } from "./storyStyles"; -const displayName = Dropdown.displayName || "Dropdown"; const title = "Simple usage"; -const description = ` - This is some basic usage with the button with providing a label to show the text. - Clicking should trigger an action.`; const demoCode = () => ( ( /> ); -// const propDocs = { inline: true, propTables: [Dropdown] }; - export default () => storiesOf("UI Components/Dropdown List", module) .addDecorator(checkA11y) diff --git a/packages/component-library/stories/Editable.story.js b/packages/component-library/stories/Editable.story.js index b9560bcfe..e146fbc2d 100644 --- a/packages/component-library/stories/Editable.story.js +++ b/packages/component-library/stories/Editable.story.js @@ -26,6 +26,7 @@ export default () => return (