-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: update markdown styles * feat: separate provider from components for easier shadowing * chore: switch from emotion to scss modules * feat: remove h1 margin-top to allow for more dynamic leads * fix: punctuation * refactor: code style * docs: update markdown docs
- Loading branch information
Showing
28 changed files
with
299 additions
and
332 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
6 changes: 2 additions & 4 deletions
6
packages/gatsby-theme-carbon/src/components/AnchorLinks/AnchorLink.js
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
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
58 changes: 0 additions & 58 deletions
58
packages/gatsby-theme-carbon/src/components/MDXProvider.js
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
packages/gatsby-theme-carbon/src/components/MDXProvider/MDXProvider.js
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,9 @@ | ||
import React from 'react'; | ||
import { MDXProvider as Provider } from '@mdx-js/react'; | ||
import defaultComponents from './defaultComponents'; | ||
|
||
const MDXProvider = ({ components = defaultComponents, ...rest }) => ( | ||
<Provider components={components} {...rest} /> | ||
); | ||
|
||
export default MDXProvider; |
54 changes: 54 additions & 0 deletions
54
packages/gatsby-theme-carbon/src/components/MDXProvider/defaultComponents.js
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,54 @@ | ||
import React from 'react'; | ||
|
||
import { P, H1, H2, H3, H4, H5, Ul, Ol, Blockquote } from '../markdown'; | ||
import PageTable from '../PageTable'; | ||
import Code from '../Code'; | ||
import PageDescription from '../PageDescription'; | ||
import Video from '../Video'; | ||
import DoDontExample from '../DoDontExample'; | ||
import Caption from '../Caption'; | ||
import ResourceCard from '../ResourceCard'; | ||
import ArticleCard from '../ArticleCard'; | ||
import Aside from '../Aside'; | ||
import FeatureCard from '../FeatureCard'; | ||
import ImageCard from '../ImageCard'; | ||
import { Row, Column, Grid } from '../Grid'; | ||
import { AnchorLink, AnchorLinks } from '../AnchorLinks'; | ||
import { Tab, Tabs } from '../Tabs'; | ||
import Link from '../Link'; | ||
|
||
const components = { | ||
wrapper: function Wrapper({ children, ...props }) { | ||
return <div {...props}>{children}</div>; | ||
}, | ||
h1: H1, | ||
h2: H2, | ||
h3: H3, | ||
h4: H4, | ||
h5: H5, | ||
p: P, | ||
ol: Ol, | ||
ul: Ul, | ||
blockquote: Blockquote, | ||
pre: Code, | ||
table: PageTable, | ||
a: Link, | ||
PageDescription, | ||
Video, | ||
DoDontExample, | ||
Row, | ||
Column, | ||
Grid, | ||
Caption, | ||
ResourceCard, | ||
ArticleCard, | ||
Aside, | ||
FeatureCard, | ||
ImageCard, | ||
AnchorLink, | ||
AnchorLinks, | ||
Tab, | ||
Tabs, | ||
}; | ||
|
||
export default components; |
3 changes: 3 additions & 0 deletions
3
packages/gatsby-theme-carbon/src/components/MDXProvider/index.js
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,3 @@ | ||
import MDXProvider from './MDXProvider'; | ||
|
||
export default MDXProvider; |
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
Oops, something went wrong.
2fef9cc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully aliased the URL https://gatsby-theme-carbon-q6yoyavbj.now.sh to the following aliases.