use markdown without mdx

This commit is contained in:
MapleLeaf
2022-01-02 21:46:41 -06:00
committed by Darius
parent 7943e6c672
commit 6d6293042e
6 changed files with 149 additions and 23 deletions

View File

@@ -1,5 +1,5 @@
import packageJson from "reacord/package.json"
import LandingExample from "../components/landing-example.md"
import { html as landingExampleHtml } from "../components/landing-example.md"
import { MainNavigation } from "../components/main-navigation"
import { maxWidthContainer } from "../styles/components"
@@ -12,9 +12,10 @@ export default function LandingPage() {
<div className="px-4 pb-8 flex flex-1">
<main className="px-4 py-6 rounded-lg shadow bg-slate-800 space-y-5 m-auto w-full max-w-xl">
<h1 className="text-6xl font-light">reacord</h1>
<section className="mx-auto text-sm sm:text-base">
<LandingExample />
</section>
<section
className="mx-auto text-sm sm:text-base"
dangerouslySetInnerHTML={{ __html: landingExampleHtml }}
/>
<p className="text-2xl font-light">{packageJson.description}</p>
<a
href="/docs/getting-started"

4
packages/docs-new/src/react.d.ts vendored Normal file
View File

@@ -0,0 +1,4 @@
import "react"
declare module "react" {
export function createContext<Value>(): Context<Value | undefined>
}

View File

@@ -1,6 +1,8 @@
/// <reference types="vite/client" />
import "react"
declare module "react" {
export function createContext<Value>(): Context<Value | undefined>
declare module "*.md" {
import type { ComponentType } from "react"
export const attributes: Record<string, any>
export const html: string
export const ReactComponent: ComponentType
}