Skip to content

Instantly share code, notes, and snippets.

@treygriffith
Created May 18, 2021 17:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save treygriffith/522d47aa12171576c876433afdede0c4 to your computer and use it in GitHub Desktop.
Save treygriffith/522d47aa12171576c876433afdede0c4 to your computer and use it in GitHub Desktop.
import * as React from 'react'
import createXkit from '@xkit-co/xkit-catalog.js'
const xkit = createXkit('viable.xkit.co')
interface IntegrationsProps {
path?: string
}
class Integrations extends React.Component<IntegrationsProps> {
private ref = React.createRef()
componentDidMount () {
xkit.renderCatalog(this.ref.current, {
hideTitle: true,
hideSearch: true,
rootPath: this.props.path
})
}
componentWillUnmount () {
xkit.unmountCatalog(this.ref.current)
}
render () {
return <div ref={this.ref}></div>
}
}
export default Integrations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment