mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-01 13:02:43 +00:00
Add 2 custom zoom related icons
New icons for Zoom to Fit, and Fit Width buttons. Used SVGR online tool to create react components and then combined them. If doing in future, be sure to set currentColor on `fill` property in the SVG itself. Make the SVGs as closed curves only (don't rely on stroke). set only a width property, not height.
This commit is contained in:
@@ -3,6 +3,8 @@ const React = require('react');
|
||||
const { useState, useEffect } = React;
|
||||
const _ = require('lodash')
|
||||
|
||||
import * as ZoomIcons from '../../../icons/icon-components/zoomIcons.jsx';
|
||||
|
||||
const MAX_ZOOM = 300;
|
||||
const MIN_ZOOM = 10;
|
||||
|
||||
@@ -92,14 +94,14 @@ const ToolBar = ({ onZoomChange, currentPage, onPageChange, totalPages })=>{
|
||||
className='tool'
|
||||
onClick={()=>handleZoomChange(calculateZoom('fill'))}
|
||||
>
|
||||
toFill
|
||||
<ZoomIcons.FitWidth title='Fit to Width' style={{ width: '1.5em' }} />
|
||||
</button>
|
||||
<button
|
||||
id='zoom-to-fit'
|
||||
className='tool'
|
||||
onClick={()=>handleZoomChange(calculateZoom('fit'))}
|
||||
>
|
||||
toFit
|
||||
<ZoomIcons.FitAll title='Zoom to Fit' style={{ width: '1.5em' }} />
|
||||
</button>
|
||||
<button
|
||||
id='zoom-out'
|
||||
|
||||
Reference in New Issue
Block a user