WIP use links for KeywordsPicker
This commit is contained in:
parent
fa815460d9
commit
0f54e1bc5c
@ -1,6 +1,7 @@
|
|||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import Checkmark from "@spectrum-icons/workflow/Checkmark";
|
import Checkmark from "@spectrum-icons/workflow/Checkmark";
|
||||||
|
import { Link } from "gatsby";
|
||||||
|
|
||||||
interface KeywordsPickerProps {
|
interface KeywordsPickerProps {
|
||||||
keywords: string[];
|
keywords: string[];
|
||||||
@ -18,7 +19,7 @@ const KeywordsPicker = ({ keywords, value, onChange }: KeywordsPickerProps) => {
|
|||||||
const selected = value === keyword;
|
const selected = value === keyword;
|
||||||
return (
|
return (
|
||||||
<li key={keyword}>
|
<li key={keyword}>
|
||||||
<button
|
<Link
|
||||||
className={classNames(
|
className={classNames(
|
||||||
`py-[5px] px-3 rounded-full text-sm`,
|
`py-[5px] px-3 rounded-full text-sm`,
|
||||||
`text-black border border-gray-400`,
|
`text-black border border-gray-400`,
|
||||||
@ -27,8 +28,8 @@ const KeywordsPicker = ({ keywords, value, onChange }: KeywordsPickerProps) => {
|
|||||||
: `bg-white
|
: `bg-white
|
||||||
hover:bg-black/10`
|
hover:bg-black/10`
|
||||||
)}
|
)}
|
||||||
onClick={() => (selected ? onChange(null) : onChange(keyword))}
|
to="?filter=keyword"
|
||||||
type="button"
|
// onClick={() => (selected ? onChange(null) : onChange(keyword))}
|
||||||
>
|
>
|
||||||
{keyword}{" "}
|
{keyword}{" "}
|
||||||
{/* {selected && (
|
{/* {selected && (
|
||||||
@ -38,7 +39,7 @@ const KeywordsPicker = ({ keywords, value, onChange }: KeywordsPickerProps) => {
|
|||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
/>
|
/>
|
||||||
)} */}
|
)} */}
|
||||||
</button>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user