Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - Fix tailwind themes in docs #2808

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions docs/docs.trychroma.com/components/layout/TopNav.tsx
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
import React, { useState, ReactNode } from 'react';
import Link from 'next/link'; // Assuming you're using Next.js Link, make sure to import it.
import React, { useState, ReactNode } from "react";
import Link from "next/link"; // Assuming you're using Next.js Link, make sure to import it.

interface TopNavProps {
children: ReactNode; // This type accepts anything that can be rendered: numbers, strings, elements or an array containing these types.
}

import '@docsearch/css';
import { DocSearch } from '@docsearch/react';
import "@docsearch/css";
import { DocSearch } from "@docsearch/react";

export function TopNav({ children }: TopNavProps) {
return (
<div className={` dark:bg-stone-950 px-2 pr-0 border-b`}>
<div className={`px-2 pr-0 border-b`}>
<nav>
<div className="flex h-16 items-center justify-between px-4 ">
<div className='flex'>
<Link href="/" className="flex column items-center">
<img src='/img/chroma.svg' alt='Chroma Logo' className='h-8 w-auto' />
<p className='ml-3 mb-0 text-lg font-semibold'>Chroma</p>
</Link>
<Search/>
<div className="flex">
<Link href="/" className="flex column items-center">
<img
src="/img/chroma.svg"
alt="Chroma Logo"
className="h-8 w-auto"
/>
<p className="ml-3 mb-0 text-lg font-semibold">Chroma</p>
</Link>
<Search />
</div>
<section className={'flex gap-x-4 items-center'}>
{children}
</section>
<section className={"flex gap-x-4 items-center"}>{children}</section>
</div>
</nav>
</div>
);
}


function Search() {
return (
<DocSearch
Expand Down
16 changes: 8 additions & 8 deletions docs/docs.trychroma.com/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: ["class"],
darkMode: ["class", '[data-theme="dark"]'],
content: [
'./pages/**/*.{ts,tsx}',
'./components/**/*.{ts,tsx}',
'./app/**/*.{ts,tsx}',
'./src/**/*.{ts,tsx}',
"./pages/**/*.{ts,tsx}",
"./components/**/*.{ts,tsx}",
"./app/**/*.{ts,tsx}",
"./src/**/*.{ts,tsx}",
],
prefix: "",
theme: {
Expand All @@ -18,8 +18,8 @@ module.exports = {
},
extend: {
fontFamily: {
sans: ['var(--font-inter)'],
mono: ['var(--font-ibm-plex-mono)'],
sans: ["var(--font-inter)"],
mono: ["var(--font-ibm-plex-mono)"],
},
colors: {
border: "hsl(var(--border))",
Expand Down Expand Up @@ -78,4 +78,4 @@ module.exports = {
},
},
plugins: [require("tailwindcss-animate")],
}
};
Loading