ortelius
Advanced tools
Comparing version 0.0.1-beta.6 to 0.0.1-beta.7
{ | ||
"name": "ortelius", | ||
"version": "0.0.1-beta.6", | ||
"version": "0.0.1-beta.7", | ||
"description": "a tool for making good-looking maps", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -9,3 +9,3 @@ import React, { useState, useContext } from 'react'; | ||
export function Geography({ path, projection, fillInitial, fillHover, stroke, geography, data }) { | ||
export function Geography({ path, fillInitial, fillHover, stroke, geography, data }) { | ||
const { handleZoomClick } = useContext(ZoomContext); | ||
@@ -51,2 +51,9 @@ | ||
}), | ||
geography: PropTypes.shape({ | ||
geometry: PropTypes.shape({ | ||
type: PropTypes.string, | ||
coordinates: PropTypes.arrayOf(PropTypes.number) | ||
}), | ||
type: PropTypes.string | ||
}).isRequired, | ||
fillHover: PropTypes.string, | ||
@@ -53,0 +60,0 @@ fillInitial: PropTypes.string, |
@@ -8,7 +8,10 @@ import React from 'react'; | ||
static propTypes = { | ||
url: PropTypes.string.isRequired, | ||
render: PropTypes.func.isRequired, | ||
filter: PropTypes.func, | ||
format: PropTypes.string, | ||
simplifyFactor: PropTypes.number | ||
height: PropTypes.number.isRequired, | ||
projection: PropTypes.func.isRequired, | ||
render: PropTypes.func.isRequired, | ||
simplifyFactor: PropTypes.number, | ||
url: PropTypes.string.isRequired, | ||
width: PropTypes.number.isRequired | ||
}; | ||
@@ -15,0 +18,0 @@ |
@@ -1,2 +0,2 @@ | ||
import React, { useState } from 'react'; | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
@@ -14,5 +14,10 @@ | ||
<div className={styles.Legend}> | ||
{title && ( | ||
<header> | ||
<h3>{title}</h3> | ||
</header> | ||
)} | ||
{legendItems.map((item, index) => { | ||
return ( | ||
<div key={`${item}-${index}`} className={styles.LegendItem}> | ||
<div key={item} className={styles.LegendItem}> | ||
<i style={{ backgroundColor: item }} /> | ||
@@ -19,0 +24,0 @@ <p>{labels[index]}</p> |
@@ -56,3 +56,3 @@ import React, { useRef } from 'react'; | ||
render: PropTypes.func.isRequired, | ||
toolbar: PropTypes.object, | ||
toolbar: Object, | ||
tooltip: PropTypes.shape({ | ||
@@ -68,3 +68,4 @@ formatter: PropTypes.func | ||
projection: d3.geoMercator(), | ||
toolbar: undefined, | ||
tooltip: undefined | ||
}; |
@@ -1,2 +0,2 @@ | ||
import React, { Fragment, useContext } from 'react'; | ||
import React, { useContext } from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
@@ -3,0 +3,0 @@ import PropTypes from 'prop-types'; |
@@ -63,2 +63,3 @@ import React, { useContext } from 'react'; | ||
Choropleth.propTypes = { | ||
dataById: PropTypes.arrayOf(Object), | ||
series: PropTypes.arrayOf(Object).isRequired, | ||
@@ -65,0 +66,0 @@ legend: PropTypes.shape({ |
import { actionTypes } from './actions'; | ||
export default function reducers(state, action) { | ||
// eslint-disable-next-line no-console | ||
console.log(state, action); | ||
@@ -5,0 +6,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
344431
1462