From 9d04c9879181deb6ca4ddd4bb3c617aead68bd10 Mon Sep 17 00:00:00 2001
From: Buddy-web3 <0buddy.ne@gmail.com>
Date: Wed, 28 Feb 2024 04:44:51 +0200
Subject: [PATCH] code changes requests + ticket #449
---
app/assets/icons/magnifying-large.svg | 5 ++
app/components/Nav/Mobile/index.tsx | 87 ++++++++-----------
app/components/Nav/Mobile/navMobile.css | 48 +++++++---
.../icons-generated/MagnifyingLarge.tsx | 12 +++
app/components/icons-generated/index.ts | 1 +
app/newRoot.css | 1 -
6 files changed, 89 insertions(+), 65 deletions(-)
create mode 100644 app/assets/icons/magnifying-large.svg
create mode 100644 app/components/icons-generated/MagnifyingLarge.tsx
diff --git a/app/assets/icons/magnifying-large.svg b/app/assets/icons/magnifying-large.svg
new file mode 100644
index 00000000..54dcef61
--- /dev/null
+++ b/app/assets/icons/magnifying-large.svg
@@ -0,0 +1,5 @@
+
diff --git a/app/components/Nav/Mobile/index.tsx b/app/components/Nav/Mobile/index.tsx
index 03823cb0..0ac95d1a 100644
--- a/app/components/Nav/Mobile/index.tsx
+++ b/app/components/Nav/Mobile/index.tsx
@@ -6,19 +6,24 @@ import {XLarge} from '~/components/icons-generated'
import {CarrotLarge} from '~/components/icons-generated'
import OpenBookIcon from '~/components/icons-generated/OpenBook'
import BotIcon from '~/components/icons-generated/Bot'
+import MagnifyingLarge from '~/components/icons-generated/MagnifyingLarge'
import {NavProps} from '~/components/Nav'
import Button from '~/components/Button'
import '../nav.css'
import './navMobile.css'
-import {sortFuncs} from '~/routes/tags.$'
-import {questionUrl, tagsUrl, tagUrl} from '~/routesMapper'
-import {TOCItem} from '~/routes/questions.toc'
+import ArticlesDropdown from '~/components/ArticlesDropdown'
+import Search from '~/components/search'
export const MobileNav = ({toc, categories}: NavProps) => {
const [showMenu, setShowMenu] = React.useState(false)
+ const [showSearch, setShowSearch] = React.useState(false)
const [showArticles, setShowArticles] = React.useState(false)
const toggleMenu = () => {
- setShowMenu(!showMenu)
+ setShowMenu(false)
setShowArticles(false)
+ setShowSearch(false)
+ }
+ const toggleSearch = () => {
+ setShowSearch(!showSearch)
}
console.log('toc', toc)
return (
@@ -26,14 +31,29 @@ export const MobileNav = ({toc, categories}: NavProps) => {
{!showArticles && (
<>
{showMenu && (
@@ -42,13 +62,13 @@ export const MobileNav = ({toc, categories}: NavProps) => {
className="secondary full-width space-between"
icon={
}
>
-
+
Articles