Created
May 18, 2021 17:06
-
-
Save treygriffith/522d47aa12171576c876433afdede0c4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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