Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Component Examples #89

Merged
merged 38 commits into from
Jun 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
e190181
chore: Install react-live
jerelmiller Jun 2, 2020
7178aa5
feat: add a component example that renders a live preview
jerelmiller Jun 2, 2020
b2ef503
feat: add styles for each component example
jerelmiller Jun 2, 2020
8d8dd83
feat: add spacing under each component example
jerelmiller Jun 2, 2020
c35cc0f
Merge remote-tracking branch 'origin/master' into jerel/example-docs
jerelmiller Jun 2, 2020
4dc68cf
fix: Use inline style override to reset sdk styles
jerelmiller Jun 2, 2020
26936d3
chore: smaller font size on code
jerelmiller Jun 2, 2020
8449211
Merge remote-tracking branch 'origin/master' into jerel/example-docs
jerelmiller Jun 3, 2020
1f724b8
chore: use to ensure styles remain the same
jerelmiller Jun 3, 2020
56eb6bb
chore: add spacing for examples
jerelmiller Jun 3, 2020
9e82c4e
chore: change to section styles
jerelmiller Jun 3, 2020
2c2068c
feat: add the rest of the text components
jerelmiller Jun 3, 2020
481db7b
chore: fallback if unable to format code
jerelmiller Jun 3, 2020
845cb07
feat: add the CardBody component
jerelmiller Jun 3, 2020
7e6733d
fix: Only show examples if there are examples to show
jerelmiller Jun 3, 2020
50ef393
feat: Add AccountPicker
jerelmiller Jun 3, 2020
c7a4a60
feat: Disable editing if there is no preview to show
jerelmiller Jun 3, 2020
f043450
chore: smaller font size on error
jerelmiller Jun 3, 2020
ed59000
feat: Add Card and CardHeader components
jerelmiller Jun 3, 2020
2db768d
feat: Add Grid component
jerelmiller Jun 3, 2020
ef68231
chore: Install react-shadow
jerelmiller Jun 3, 2020
ed2ff89
chore: Load sdk with the main site rather than async
jerelmiller Jun 3, 2020
663dbab
feat: Move CSS to shadow DOM for style isolation
jerelmiller Jun 3, 2020
4295bd9
chore: Remove important from global styles as they are no longer needed
jerelmiller Jun 3, 2020
a53032d
feat: Show loading text on example when styles have not loaded
jerelmiller Jun 3, 2020
797d958
feat: Add Icon component
jerelmiller Jun 3, 2020
7d619d4
feat: Add Toast example and handle ToastManager
jerelmiller Jun 3, 2020
705ca90
chore: Move component docs to proper subfolder
jerelmiller Jun 3, 2020
b6a2824
feat: Add modal and tooltip components
jerelmiller Jun 3, 2020
10df676
feat: Add Spinner component. Allow example to take preview style
jerelmiller Jun 3, 2020
dde2f10
feat: Add Stack component and styles
jerelmiller Jun 3, 2020
9a43c6c
feat: Add AreaChart and AccountStorageMutation components
jerelmiller Jun 3, 2020
7ad682d
feat: Only render editor if the component is live otherwise render co…
jerelmiller Jun 3, 2020
a807263
chore: Remove unused noInline frontmatter
jerelmiller Jun 3, 2020
0b608d7
feat: Add NerdGraphQuery and NrqlQuery components
jerelmiller Jun 3, 2020
0355d26
feat: Add PlatformStateContext and NerdletStateContext
jerelmiller Jun 3, 2020
f0b1969
chore: Revert useStylesheet back to version in master
jerelmiller Jun 3, 2020
dd0806b
refactor: Move component preview code into own component
jerelmiller Jun 3, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion gatsby-ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@

// This is needed to ensure the NR1 SDK can load properly
const React = require('react');
const { JS_BUNDLE } = require('./src/utils/sdk');

exports.onPreRenderHTML = ({ getHeadComponents, replaceHeadComponents }) => {
exports.onPreRenderHTML = ({
getHeadComponents,
replaceHeadComponents,
getPostBodyComponents,
replacePostBodyComponents,
}) => {
replaceHeadComponents([
...getHeadComponents(),
<script
Expand Down Expand Up @@ -36,4 +42,9 @@ exports.onPreRenderHTML = ({ getHeadComponents, replaceHeadComponents }) => {
src="//nr1.nr-assets.net/lib/d3/3.5.17/d3.js"
/>,
]);

replacePostBodyComponents([
...getPostBodyComponents(),
<script key="nr1-sdk" crossOrigin="anonymous" src={JS_BUNDLE} />,
]);
};
Loading