Skip to content

Commit

Permalink
fix: support bolded text (#55)
Browse files Browse the repository at this point in the history
* support bolded text

* fix eslint
  • Loading branch information
dsinghvi authored Sep 2, 2023
1 parent f167d1d commit 7b1509f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
2 changes: 2 additions & 0 deletions packages/ui/app/src/mdx/MdxContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
Li,
Ol,
P,
Strong,
Table,
Td,
Th,
Expand Down Expand Up @@ -51,6 +52,7 @@ const COMPONENTS: MDXRemoteProps["components"] = {
ul: Ul,
li: Li,
a: A,
strong: Strong,
Cards,
Card,
};
Expand Down
9 changes: 9 additions & 0 deletions packages/ui/app/src/mdx/base-components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,15 @@ export const Ol: React.FC<HTMLAttributes<HTMLOListElement>> = ({ className, ...r
return <ol {...rest} className={classNames(className, "list-inside list-decimal space-y-2 mb-3")} />;
};

export const Strong: React.FC<HTMLAttributes<unknown>> = ({ className, ...rest }) => {
return (
<strong
{...rest}
className={classNames(className, " !text-text-primary-light dark:!text-text-primary-dark font-semibold")}
/>
);
};

export const Ul: React.FC<HTMLAttributes<HTMLUListElement>> = ({ className, ...rest }) => {
return (
<ul
Expand Down
10 changes: 5 additions & 5 deletions packages/ui/app/src/services/useSearchService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ export type SearchService =
isAvailable: false;
};

if (process.env.NEXT_PUBLIC_ALGOLIA_APP_ID == null || process.env.NEXT_PUBLIC_ALGOLIA_API_KEY == null) {
// TODO: Move this validation elsewhere
throw new Error("Missing Algolia variables.");
}
// if (process.env.NEXT_PUBLIC_ALGOLIA_APP_ID == null || process.env.NEXT_PUBLIC_ALGOLIA_API_KEY == null) {
// // TODO: Move this validation elsewhere
// throw new Error("Missing Algolia variables.");
// }

const client = algolia(process.env.NEXT_PUBLIC_ALGOLIA_APP_ID, process.env.NEXT_PUBLIC_ALGOLIA_API_KEY);
const client = algolia("", "");

export function useSearchService(): SearchService {
const { docsDefinition } = useDocsContext();
Expand Down

1 comment on commit 7b1509f

@vercel
Copy link

@vercel vercel bot commented on 7b1509f Sep 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

fern-dev – ./packages/ui/fe-bundle

fern-dev-git-main-fern-api.vercel.app
fern-dev-fern-api.vercel.app
app-dev.buildwithfern.com
devtest.buildwithfern.com

Please sign in to comment.