-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'docs-v2' into ADAPP-16869-port-android-documentation
- Loading branch information
Showing
20 changed files
with
466 additions
and
246 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import type { FC } from "react"; | ||
|
||
import type { IconProps } from "../types"; | ||
|
||
const ChevronLeft: FC<IconProps> = (props) => { | ||
return ( | ||
<svg | ||
width={24} | ||
height={24} | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
{...props} | ||
> | ||
<path | ||
fillRule="evenodd" | ||
clipRule="evenodd" | ||
d="M14.265 19.178L7.64 12l6.626-7.178 1.47 1.356L10.36 12l5.374 5.822-1.47 1.356z" | ||
fill="currentColor" | ||
/> | ||
<rect | ||
x={23.5} | ||
y={23.5} | ||
width={23} | ||
height={23} | ||
rx={2.5} | ||
transform="rotate(-180 23.5 23.5)" | ||
stroke="#000" | ||
/> | ||
</svg> | ||
); | ||
}; | ||
|
||
export default ChevronLeft; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import type { FC } from "react"; | ||
|
||
import type { IconProps } from "../types"; | ||
|
||
const ChevronRight: FC<IconProps> = (props) => { | ||
return ( | ||
<svg | ||
width={24} | ||
height={24} | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
{...props} | ||
> | ||
<path | ||
fillRule="evenodd" | ||
clipRule="evenodd" | ||
d="M9.735 4.822L16.36 12l-6.626 7.178-1.47-1.356L13.64 12 8.265 6.178l1.47-1.356z" | ||
fill="currentColor" | ||
/> | ||
<rect x={0.5} y={0.5} width={23} height={23} rx={2.5} stroke="#000" /> | ||
</svg> | ||
); | ||
}; | ||
|
||
export default ChevronRight; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
--- | ||
import type { MarkdownHeading } from "astro"; | ||
import TableOfContents from "./TableOfContents"; | ||
type Props = { | ||
headings: MarkdownHeading[]; | ||
title: string; | ||
}; | ||
const { headings } = Astro.props; | ||
const { headings, title } = Astro.props; | ||
--- | ||
|
||
<nav class="w-full sticky top-10" aria-labelledby="grid-right"> | ||
<div class="h-full p-0 overflow-auto xs:hidden lg:block"> | ||
<TableOfContents client:visible headings={headings} /> | ||
</div> | ||
</nav> | ||
<TableOfContents client:only="react" headings={headings} title={title} /> |
This file was deleted.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
src/components/RightSidebar/TableOfContents/CollapsedTOC.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import type { FC } from "react"; | ||
|
||
import ChevronLeft from "@components/Icons/react/ChevronLeft"; | ||
|
||
interface CollapsedTOCProps { | ||
setIsOpened: (value: boolean) => void; | ||
} | ||
|
||
const CollapsedTOC: FC<CollapsedTOCProps> = ({ setIsOpened }) => { | ||
return ( | ||
<div className="xs:hidden lg:fixed top-0 bottom-0 md:right-0 xxl:left-0 mt-32 xxl:ml-[calc(100vw-2rem-(100vw-100rem)/2)] items-start w-8 sm:hidden lg:flex z-10 border-[1px] border-t rounded-tl-lg border-bluish-grey"> | ||
<button | ||
onClick={() => setIsOpened(true)} | ||
className="toc-state-button absolute rounded-md mt-8 -ml-4 bg-white z-50 w-6 h-6" | ||
> | ||
<ChevronLeft /> | ||
</button> | ||
</div> | ||
); | ||
}; | ||
|
||
export default CollapsedTOC; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import type { MarkdownHeading } from "astro"; | ||
import type { FC } from "react"; | ||
import { unescape } from "html-escaper"; | ||
|
||
import "../right-sidebar.css"; | ||
|
||
interface TableOfContentsMobileProps { | ||
onThisPageID: string; | ||
toc: React.RefObject<HTMLUListElement>; | ||
headingsLocal: MarkdownHeading[]; | ||
} | ||
|
||
const TableOfContentsMobile: FC<TableOfContentsMobileProps> = ({ | ||
onThisPageID, | ||
toc, | ||
headingsLocal, | ||
}) => { | ||
return ( | ||
<div className="xs:block lg:hidden border-[1px] p-2 my-4"> | ||
<h2 id={onThisPageID} className="heading"> | ||
On this page | ||
</h2> | ||
<ul ref={toc} className="pl-4"> | ||
{headingsLocal | ||
.filter(({ depth }) => depth > 1 && depth < 4) | ||
.map((heading) => ( | ||
<li | ||
key={heading.slug} | ||
className={`header-link before:content-none depth-${heading.depth}`} | ||
> | ||
<a href={`#${heading.slug}`}>{unescape(heading.text)}</a> | ||
</li> | ||
))} | ||
</ul> | ||
</div> | ||
); | ||
}; | ||
|
||
export default TableOfContentsMobile; |
Oops, something went wrong.