diff --git a/site/src/Blockquote/Blockquote.css.ts b/site/src/Blockquote/Blockquote.css.ts index 3c233c6f3..ea71e8c41 100644 --- a/site/src/Blockquote/Blockquote.css.ts +++ b/site/src/Blockquote/Blockquote.css.ts @@ -1,5 +1,5 @@ import { globalStyle, style } from '@vanilla-extract/css'; -import { darkMode } from '../system/styles/sprinkles.css'; +import { darkMode } from '../system/styles'; import { vars } from '../themes.css'; export const root = style({ diff --git a/site/src/Blockquote/Blockquote.tsx b/site/src/Blockquote/Blockquote.tsx index 2f45c5a62..745fe8804 100644 --- a/site/src/Blockquote/Blockquote.tsx +++ b/site/src/Blockquote/Blockquote.tsx @@ -2,7 +2,11 @@ import { ReactNode } from 'react'; import { Box } from '../system'; import * as styles from './Blockquote.css'; -export default (props: { children: ReactNode }) => { +export interface BlockquoteProps { + children: ReactNode; +} + +export const Blockquote = (props: BlockquoteProps) => { return ( ; } -export const ErrorHighlighter = ({ tokens, children }: CodeProps) => { +export const ErrorHighlighter = ({ + tokens, + children, +}: ErrorHighlighterProps) => { const rootRef = useRef(null); useEffect(() => { diff --git a/site/src/Code/SyntaxHighlighter.css.ts b/site/src/Code/SyntaxHighlighter.css.ts index 26ea3ea97..06c954fdc 100644 --- a/site/src/Code/SyntaxHighlighter.css.ts +++ b/site/src/Code/SyntaxHighlighter.css.ts @@ -4,7 +4,7 @@ import { createThemeContract, assignVars, } from '@vanilla-extract/css'; -import { darkMode } from '../system/styles/sprinkles.css'; +import { darkMode } from '../system/styles'; import { vars } from '../themes.css'; const themeVars = createThemeContract({ diff --git a/site/src/Code/SyntaxHighlighter.tsx b/site/src/Code/SyntaxHighlighter.tsx index 11b5be5e1..62f3b10eb 100644 --- a/site/src/Code/SyntaxHighlighter.tsx +++ b/site/src/Code/SyntaxHighlighter.tsx @@ -1,23 +1,27 @@ // @ts-ignore -import { PrismLight as SyntaxHighlighter } from 'react-syntax-highlighter/dist/esm/index'; +import { PrismLight } from 'react-syntax-highlighter/dist/esm/index'; // @ts-ignore import tsx from 'react-syntax-highlighter/dist/esm/languages/prism/tsx'; // @ts-ignore import ts from 'react-syntax-highlighter/dist/esm/languages/prism/typescript'; -SyntaxHighlighter.registerLanguage('tsx', tsx); -SyntaxHighlighter.registerLanguage('ts', ts); +PrismLight.registerLanguage('tsx', tsx); +PrismLight.registerLanguage('ts', ts); import { Box } from '../system'; -import Text from '../Typography/Text'; +import { Text } from '../typography'; import * as styles from './SyntaxHighlighter.css'; -export interface CodeProps { +export interface SyntaxHighlighterProps { language: string; children: string; tokenized?: boolean; } -export default ({ language, children, tokenized }: CodeProps) => { +export const SyntaxHighlighter = ({ + language, + children, + tokenized, +}: SyntaxHighlighterProps) => { return ( @@ -28,12 +32,12 @@ export default ({ language, children, tokenized }: CodeProps) => { dangerouslySetInnerHTML={{ __html: children }} /> ) : ( - {children} - + )} diff --git a/site/src/ColorModeToggle/ColorModeToggle.css.ts b/site/src/ColorModeToggle/ColorModeToggle.css.ts index adc66a687..120c6195d 100644 --- a/site/src/ColorModeToggle/ColorModeToggle.css.ts +++ b/site/src/ColorModeToggle/ColorModeToggle.css.ts @@ -1,5 +1,5 @@ import { assignVars, createThemeContract, style } from '@vanilla-extract/css'; -import { darkMode } from '../system/styles/sprinkles.css'; +import { darkMode } from '../system/styles'; import { vars } from '../themes.css'; const themeVars = createThemeContract({ diff --git a/site/src/ColorModeToggle/ColorModeToggle.tsx b/site/src/ColorModeToggle/ColorModeToggle.tsx index b00ddd361..ad5d43c24 100644 --- a/site/src/ColorModeToggle/ColorModeToggle.tsx +++ b/site/src/ColorModeToggle/ColorModeToggle.tsx @@ -21,7 +21,11 @@ export const ColorModeContext = createContext({ setColorMode: () => {}, }); -export function ColorModeProvider({ children }: { children: ReactNode }) { +export interface ColorModeProviderProps { + children: ReactNode; +} + +export const ColorModeProvider = ({ children }: ColorModeProviderProps) => { const [colorMode, setColorMode] = useState(null); useEffect(() => { @@ -51,7 +55,7 @@ export function ColorModeProvider({ children }: { children: ReactNode }) { {children} ); -} +}; export const ColorModeToggle = () => { const { colorMode, setColorMode } = useContext(ColorModeContext); diff --git a/site/src/Divider/Divider.tsx b/site/src/Divider/Divider.tsx index db5bfb975..9f87e17ce 100644 --- a/site/src/Divider/Divider.tsx +++ b/site/src/Divider/Divider.tsx @@ -1,7 +1,7 @@ import { Box } from '../system'; import * as styles from './Divider.css'; -export default () => { +export const Divider = () => { return ( ( +export const SiblingDoc = ({ + title, + route, + subtitle, + direction, +}: SiblingDocProps) => ( void; -}) => { +} + +export const Fab = ({ open, onClick }: FabProps) => { return ( ( { return ( diff --git a/site/src/InlineCode/InlineCode.css.ts b/site/src/InlineCode/InlineCode.css.ts index 8915da4b8..c6c2b1803 100644 --- a/site/src/InlineCode/InlineCode.css.ts +++ b/site/src/InlineCode/InlineCode.css.ts @@ -1,5 +1,5 @@ import { style } from '@vanilla-extract/css'; -import { darkMode } from '../system/styles/sprinkles.css'; +import { darkMode } from '../system/styles'; import { vars } from '../themes.css'; export const code = style({ diff --git a/site/src/InlineCode/InlineCode.tsx b/site/src/InlineCode/InlineCode.tsx index 8b31b359e..f4f36f711 100644 --- a/site/src/InlineCode/InlineCode.tsx +++ b/site/src/InlineCode/InlineCode.tsx @@ -6,7 +6,7 @@ export interface InlineCodeProps { children: ReactNode; inline?: boolean; } -export default ({ children }: InlineCodeProps) => { +export const InlineCode = ({ children }: InlineCodeProps) => { return ( ( +export interface LogoProps { + height?: string | number; +} + +export const Logo = ({ height = '100%' }: LogoProps) => ( { ); }; -export default { +export const mdxComponents = { hr: () => (