From fe9efa7128c88e2f0bdc850a12abc821edae565a Mon Sep 17 00:00:00 2001 From: taha12322 <66300435+taha12322@users.noreply.github.com> Date: Tue, 24 Aug 2021 15:04:57 +0430 Subject: [PATCH] setting header footer --- src/components/Setting/FontSize/fontsize.js | 18 ++++++++--- .../Setting/LineHeight/lineheight.js | 30 ++++++++++++------- src/components/footer/progressBar.js | 2 +- src/components/nav/BookInfo.tsx | 6 ++-- src/components/style/footerStyle.scss | 4 +++ src/components/style/slider.scss | 7 +++-- src/containers/Footer.tsx | 20 +++++++++---- src/containers/Header.tsx | 4 +-- src/containers/Reader.tsx | 20 +++++++------ src/containers/menu/Nav.tsx | 1 - src/containers/menu/Option.tsx | 4 +++ src/lib/styles/readerStyle.css | 7 +++++ src/types/book.ts | 1 + 13 files changed, 85 insertions(+), 39 deletions(-) diff --git a/src/components/Setting/FontSize/fontsize.js b/src/components/Setting/FontSize/fontsize.js index b953c64..6386c9d 100644 --- a/src/components/Setting/FontSize/fontsize.js +++ b/src/components/Setting/FontSize/fontsize.js @@ -34,11 +34,21 @@ function Display(props) { const Fontsize = (props) => { const { bookStyle, setBookStyle } = props; // const [countersize, setCounter ] = useState(1) - const incrementCounter = () => - setBookStyle({ ...bookStyle, fontSize: bookStyle.fontSize + 1 }); - let decrementCounter = () => - setBookStyle({ ...bookStyle, fontSize: bookStyle.fontSize - 1 }); + const incrementCounter = () => { + if (bookStyle.fontSize !== 20) { + setBookStyle({ ...bookStyle, fontSize: bookStyle.fontSize + 1 }); + } else { + return; + } + }; + let decrementCounter = () => { + if (bookStyle.fontSize !== 10) { + setBookStyle({ ...bookStyle, fontSize: bookStyle.fontSize - 1 }); + } else { + return; + } + }; return (