Skip to content

Commit

Permalink
Merge pull request #3799 from terrestris/lint-minors
Browse files Browse the repository at this point in the history
ci: fix some minor lint warnings
  • Loading branch information
dnlkoch committed Apr 30, 2024
2 parents d84fbd2 + 4fa5d17 commit 13b6912
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 23 deletions.
24 changes: 11 additions & 13 deletions src/Button/RotationButton/RotationButton.example.md
@@ -1,17 +1,15 @@
This demonstrates the use of the RotationButton

```jsx
import { useEffect, useState } 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 MapComponent from "@terrestris/react-util/dist/Components/MapComponent/MapComponent";
import MapContext from "@terrestris/react-util/dist/Context/MapContext/MapContext";
import RotationButton from "@terrestris/react-geo/dist/Button/RotationButton/RotationButton";
import RotationButton from '@terrestris/react-geo/dist/Button/RotationButton/RotationButton';
import MapComponent from '@terrestris/react-util/dist/Components/MapComponent/MapComponent';
import MapContext from '@terrestris/react-util/dist/Context/MapContext/MapContext';
import OlLayerTile from 'ol/layer/Tile';
import OlMap from 'ol/Map';
import { fromLonLat } from 'ol/proj';
import OlSourceOsm from 'ol/source/OSM';
import OlView from 'ol/View';
import { useEffect, useState } from 'react';

const RotationButtonExample = () => {
const [map, setMap] = useState();
Expand All @@ -22,7 +20,7 @@ const RotationButtonExample = () => {
new OlMap({
layers: [
new OlLayerTile({
name: "OSM",
name: 'OSM',
source: new OlSourceOsm(),
}),
],
Expand All @@ -44,7 +42,7 @@ const RotationButtonExample = () => {
<MapComponent
map={map}
style={{
height: "400px",
height: '400px',
}}
/>
<RotationButton
Expand Down
6 changes: 2 additions & 4 deletions src/Button/RotationButton/RotationButton.tsx
@@ -1,11 +1,9 @@
import React from 'react';

import { faArrowsRotate } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';

import { useOlInteraction } from '@terrestris/react-util/';
import { DragRotateAndZoom } from 'ol/interaction.js';
import React from 'react';

import { useOlInteraction } from '@terrestris/react-util/';
import ToggleButton, {
ToggleButtonProps
} from '../ToggleButton/ToggleButton';
Expand Down
2 changes: 1 addition & 1 deletion src/Button/SimpleButton/SimpleButton.spec.tsx
@@ -1,4 +1,4 @@
import { fireEvent,render, screen } from '@testing-library/react';
import { fireEvent, render, screen } from '@testing-library/react';
import React from 'react';

import SimpleButton from './SimpleButton';
Expand Down
8 changes: 4 additions & 4 deletions src/Button/ToggleButton/ToggleButton.tsx
Expand Up @@ -121,10 +121,10 @@ export const ToggleButton: React.FC<ToggleButtonProps> = ({
style={{
backgroundColor:
buttonTransparent
? 'transparent'
: pressed
? token.token.colorPrimaryActive
: token.token.colorPrimary
? 'transparent'
: pressed
? token.token.colorPrimaryActive
: token.token.colorPrimary
}}
type={type}
onClick={handleChange}
Expand Down
2 changes: 1 addition & 1 deletion src/LayerSwitcher/LayerSwitcher.example.md
Expand Up @@ -5,7 +5,7 @@ The passed layers are handled like only one of it can be visible.
```jsx
import LayerSwitcher from '@terrestris/react-geo/dist/LayerSwitcher/LayerSwitcher';
import MapComponent from '@terrestris/react-util/dist/Components/MapComponent/MapComponent';
import MapContext from '@terrestris/react-util/dist/Context/MapContext/MapContext'
import MapContext from '@terrestris/react-util/dist/Context/MapContext/MapContext';
import OlLayerTile from 'ol/layer/Tile';
import OlMap from 'ol/Map';
import { fromLonLat } from 'ol/proj';
Expand Down

0 comments on commit 13b6912

Please sign in to comment.