Skip to content

Commit

Permalink
feat: try it panel event handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
melissag-ensemble committed Sep 10, 2024
1 parent 01390b3 commit 4dc3770
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/gatsby-theme-aio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adobe/gatsby-theme-aio",
"version": "4.14.10",
"version": "4.14.11-rc3",
"description": "The Adobe I/O theme for building markdown powered sites",
"main": "index.js",
"license": "Apache-2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ const RedoclyAPIBlock = ({
jsonSampleExpandLevel = 2,
generateCodeSamples = 'languages: [], skipOptionalParameters: false,',
requestInterceptor = '',
tryItOpenEventHandler = '',
tryItSentEventHandler = '',
}) => {
const [isRedoclyLoading, setIsRedoclyLoading] = useState(true);

Expand Down Expand Up @@ -75,6 +77,10 @@ const RedoclyAPIBlock = ({
jsonSampleExpandLevel: ${jsonSampleExpandLevel === all ? `'${jsonSampleExpandLevel}'` : jsonSampleExpandLevel},
${generateCodeSamples ? "generateCodeSamples: { " + generateCodeSamples + "}," : ''}
${requestInterceptor ? "requestInterceptor: " + requestInterceptor + "," : ''}
events: {
${tryItOpenEventHandler ? "tryItOpen: " + tryItOpenEventHandler + "," : ''}
${tryItSentEventHandler ? "tryItSent: " + tryItSentEventHandler + "," : ''}
},
hideLoading: true,
theme: {
${typography ? "typography: { " + typography + "}," : ''}
Expand Down Expand Up @@ -109,6 +115,8 @@ RedoclyAPIBlock.propTypes = {
]),
generateCodeSamples: PropTypes.string,
requestInterceptor: PropTypes.string,
tryItOpenEventHandler: PropTypes.string,
tryItSentEventHandler: PropTypes.string,
};

export { RedoclyAPIBlock };

0 comments on commit 4dc3770

Please sign in to comment.