-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: setup multi code examples in docs
chore: setup multi code examples in docs #2
- Loading branch information
Showing
9 changed files
with
377 additions
and
724 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
1 change: 1 addition & 0 deletions
1
website/src/@commercetools-docs/gatsby-theme-docs/overrides/.gitignore
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 @@ | ||
addon-components.js |
2 changes: 2 additions & 0 deletions
2
website/src/@commercetools-docs/gatsby-theme-docs/overrides/markdown-components.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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import { BetaFlag } from '@commercetools-docs/gatsby-theme-docs'; | ||
import Playground from '../../../components/playground'; | ||
import addonComponents from './addon-components'; | ||
|
||
const markdownComponents = { | ||
Playground, | ||
BetaFlag, | ||
...addonComponents, | ||
}; | ||
|
||
export default markdownComponents; |
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,12 @@ | ||
import { useQuery } from '@apollo/client/react'; | ||
import { GRAPHQL_TARGETS } from '@commercetools-frontend/constants'; | ||
|
||
const Channels = (props) => { | ||
const { data } = useQuery(FetchChannelsQuery, { | ||
context: { | ||
target: GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM, | ||
}, | ||
}); | ||
|
||
return <div>{/* Do something with `data` */}</div>; | ||
}; |
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,12 @@ | ||
import { useQuery } from '@apollo/client/react'; | ||
import { GRAPHQL_TARGETS } from '@commercetools-frontend/constants'; | ||
|
||
const Channels = (props) => { | ||
const { data } = useQuery(FetchChannelsQuery, { | ||
context: { | ||
target: GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM, | ||
}, | ||
}); | ||
|
||
return <div>{/* Do something with `data` */}</div>; | ||
}; |
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.