-
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
- Loading branch information
Showing
9 changed files
with
384 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
8 changes: 8 additions & 0 deletions
8
website/src/@commercetools-docs/gatsby-theme-docs/overrides/addon-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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* eslint-disable prettier/prettier */ | ||
/* eslint import/no-anonymous-default-export: [2, {"allowObject": true}] */ | ||
/* THIS IS AN AUTOGENERATED FILE, DO NOT EDIT DIRECTLY */ | ||
import * as components0 from '@commercetools-docs/gatsby-theme-code-examples/shortcodes'; | ||
|
||
export default { | ||
...components0, | ||
}; |
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.