forked from adobe/react-spectrum
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0f2c781
commit cfd890e
Showing
19 changed files
with
824 additions
and
1,001 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { style } from '../../packages/@react-spectrum/s2/style/spectrum-theme' with {type: 'macro'}; | ||
import {highlight} from './highlight' with {type: 'macro'}; | ||
import {H2, H3, H3, P, Pre, Code, Strong, H4, Link} from './typography'; | ||
import {MDXProvider} from '@mdx-js/react'; | ||
|
||
const mdxComponents = { | ||
h1: ({children}) => <h1 className={style({font: 'heading-2xl'})}>{children}</h1>, | ||
h2: H2, | ||
h3: H3, | ||
h4: H4, | ||
p: P, | ||
pre: Pre, | ||
code: Code, | ||
strong: Strong, | ||
ul: ({children}) => <ul className="sb-unstyled">{children}</ul>, | ||
li: ({children}) => <li className={style({font: 'body-lg', marginTop: 0, marginBottom: 4})}>{children}</li>, | ||
a: Link | ||
} | ||
|
||
export function MDXLayout({children}) { | ||
return ( | ||
<div className={style({maxWidth: 'lg', marginX: 'auto'})}> | ||
<main className={style({marginX: 48})}> | ||
<MDXProvider components={mdxComponents}> | ||
{children} | ||
</MDXProvider> | ||
</main> | ||
</div> | ||
); | ||
} |
Oops, something went wrong.