mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
Feature: Add Search button in section header
This commit is contained in:
parent
aac6849bc5
commit
a52b53a48c
@ -2,6 +2,7 @@ import React from 'react'
|
|||||||
import { Link, StaticQuery, graphql } from 'gatsby'
|
import { Link, StaticQuery, graphql } from 'gatsby'
|
||||||
import { ReactComponent as Logo } from '@oceanprotocol/art/logo/logo.svg'
|
import { ReactComponent as Logo } from '@oceanprotocol/art/logo/logo.svg'
|
||||||
import styles from './Header.module.scss'
|
import styles from './Header.module.scss'
|
||||||
|
import SearchComponent from './Search/SearchComponent'
|
||||||
|
|
||||||
const query = graphql`
|
const query = graphql`
|
||||||
query {
|
query {
|
||||||
@ -37,7 +38,6 @@ const Header = () => (
|
|||||||
<Logo className={styles.headerLogoImage} />
|
<Logo className={styles.headerLogoImage} />
|
||||||
<h1 className={styles.headerTitle}>{siteTitle}</h1>
|
<h1 className={styles.headerTitle}>{siteTitle}</h1>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<nav className={styles.headerMenu}>
|
<nav className={styles.headerMenu}>
|
||||||
{sections.map(({ node }) => (
|
{sections.map(({ node }) => (
|
||||||
<Link
|
<Link
|
||||||
@ -48,6 +48,7 @@ const Header = () => (
|
|||||||
{node.title}
|
{node.title}
|
||||||
</Link>
|
</Link>
|
||||||
))}
|
))}
|
||||||
|
<SearchComponent className={styles.section} />
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
@ -88,7 +88,7 @@ const SearchClient = ({ searchableData }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<>
|
||||||
<Button
|
<Button
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
onClick={handleOpen}
|
onClick={handleOpen}
|
||||||
@ -134,7 +134,7 @@ const SearchClient = ({ searchableData }) => {
|
|||||||
</div>
|
</div>
|
||||||
</Fade>
|
</Fade>
|
||||||
</Modal>
|
</Modal>
|
||||||
</div>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user