Skip to content

Commit

Permalink
sweep: Create src/components/SettingsPanel.js
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Aug 3, 2023
1 parent 268049f commit da848e9
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions src/components/SettingsPanel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import React from 'react';
import Slider from 'rc-slider';
import { AiOutlineZoomIn, AiOutlineZoomOut } from 'react-icons/ai';
import { MdSettings } from 'react-icons/md';

const SettingsPanel = ({ zoomLevel, setZoomLevel, configModalOpen, setConfigModalOpen }) => {
return (
<>
<button className="inline-block mr-4 text-gray-400" onClick={() => setConfigModalOpen(true)}>
<MdSettings className="inline-block" />
</button>
<button
className="inline-block"
onClick={() => setZoomLevel((x) => x - 0.1)}
>
<AiOutlineZoomOut className="inline-block" />
</button>
<Slider
value={zoomLevel}
onChange={(x) => setZoomLevel(x)}
min={-9.5}
max={1}
step={0.001}
style={{ width: 150 }}
className="inline-block mx-3"
/>
<button
className="inline-block"
onClick={() => setZoomLevel((x) => x + 0.1)}
>
<AiOutlineZoomIn className="inline-block" />
</button>
</>
);
};

export default SettingsPanel;

0 comments on commit da848e9

Please sign in to comment.