Skip to content

Commit

Permalink
Merge ce599db into 9234122
Browse files Browse the repository at this point in the history
  • Loading branch information
greenkeeper[bot] committed Feb 20, 2019
2 parents 9234122 + ce599db commit 858f2e3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"np": "4.0.2",
"ol": "5.3.0",
"react": "16.8.2",
"react-styleguidist": "8.0.6",
"react-styleguidist": "9.0.0",
"react-test-renderer": "16.8.2",
"regenerator-runtime": "0.13.1",
"rimraf": "2.6.3",
Expand Down
21 changes: 10 additions & 11 deletions src/Button/DigitizeButton/DigitizeButton.example.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
This demonstrates the use of DigitizeButton with different interactions.

```jsx
const React = require('react');
const OlMap = require('ol/Map').default;
const OlView = require('ol/View').default;
const OlLayerTile = require('ol/layer/Tile').default;
const OlSourceOsm = require('ol/source/OSM').default;
const fromLonLat = require('ol/proj').fromLonLat;

const {
ToggleGroup,
DigitizeButton
} = require('../../index');
import React from 'react';

import OlMap from 'ol/Map';
import OlView from 'ol/View';
import OlLayerTile from 'ol/layer/Tile';
import OlSourceOsm from 'ol/source/OSM';
import { fromLonLat } from 'ol/proj';

import DigitizeButton from '@terrestris/react-geo/Button/DigitizeButton/DigitizeButton';
import ToggleGroup from '@terrestris/react-geo/Button/ToggleGroup/ToggleGroup';

class DigitizeButtonExample extends React.Component {

Expand Down
5 changes: 5 additions & 0 deletions styleguide.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,16 @@ module.exports = {
getExampleFilename(componentPath) {
return componentPath.replace(/\.jsx?$/, '.example.md');
},
skipComponentsWithoutExample: true,
getComponentPathLine(componentPath) {
const name = path.basename(componentPath, '.jsx');
const dir = path.dirname(componentPath).replace('src', 'dist');
return `import ${name} from '@terrestris/react-geo/${dir}/${name}';`;
},
moduleAliases: {
'@terrestris/react-geo': path.resolve(__dirname, 'src'),
'ol': path.resolve(__dirname, 'node_modules/ol')
},
require: [
'@babel/polyfill',
'whatwg-fetch',
Expand Down

0 comments on commit 858f2e3

Please sign in to comment.