Skip to content

Commit

Permalink
ts for faq
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubabrzy committed Sep 20, 2023
1 parent 4caac50 commit 9b35139
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/Accordion/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useLocation } from "@docusaurus/router";

import React, { useEffect, useRef } from "react";

type AccordionItemProps = {
export type AccordionItemProps = {
children: React.ReactNode;
summary: string;
open?: boolean;
Expand Down
10 changes: 6 additions & 4 deletions src/components/FAQ/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import Accordion from "../Accordion";
import AccordionItem from "../Accordion/Item";
import AccordionItem, { AccordionItemProps } from "../Accordion/Item";
import Button from "../Button";
import Faq from "../../../faq.mdx";
import { MDXProvider } from "@mdx-js/react";
Expand All @@ -17,12 +17,14 @@ export default function FAQ() {
<Accordion>
<MDXProvider
components={{
AccordionItem: (props) =>
AccordionItem: (props: AccordionItemProps) =>
props.highlight ? <AccordionItem {...props} /> : null,
a: (props) => (
a: (props: React.AnchorHTMLAttributes<HTMLAnchorElement>) => (
<Link className="text-inherit underline" {...props} />
),
blockquote: (props) => (
blockquote: (
props: React.BlockquoteHTMLAttributes<HTMLQuoteElement>
) => (
<blockquote
className="border-l-4 border-gray-300 text-inherit pl-4"
{...props}
Expand Down

0 comments on commit 9b35139

Please sign in to comment.