docs: 📝 update docs

This commit is contained in:
Leifer Mendez
2022-12-22 13:49:37 +01:00
parent 160adee406
commit 65ffbc358d
10 changed files with 145 additions and 40 deletions

View File

@@ -1,20 +1,28 @@
import { component$ } from '@builder.io/qwik'
import { useLocation } from '@builder.io/qwik-city'
/**
* options = [] array con la lista de opciones de la documentacion
*/
export default component$(
({
options = [],
}: {
options: { link: string; name: string; class?: string }[]
}) => {
({ options = [] }: { options: { link: string; name: string }[] }) => {
const location = useLocation()
const currentPage = location.pathname
return (
<div>
<ul>
{options.map((opt) => (
<li class={opt.class}>
<a href={opt.link}>{opt.name}</a>
<li>
<a
class={
currentPage === `${opt.link}/`
? 'font-semibold'
: ''
}
href={opt.link}
>
{opt.name}
</a>
</li>
))}
</ul>