Skip to content

Commit

Permalink
Use import of require statements to make examples appear more realistic
Browse files Browse the repository at this point in the history
  • Loading branch information
dnlkoch committed Feb 20, 2019
1 parent 8da9bd3 commit ce599db
Showing 1 changed file with 10 additions and 11 deletions.
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

0 comments on commit ce599db

Please sign in to comment.