-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
67 changed files
with
4,738 additions
and
653 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
document.addEventListener('DOMContentLoaded', () => { | ||
// Load the external dependencies | ||
function loadScript(src, onLoadCallback) { | ||
const script = document.createElement('script'); | ||
script.src = src; | ||
script.onload = onLoadCallback; | ||
document.head.appendChild(script); | ||
} | ||
|
||
function createRootElement() { | ||
const rootElement = document.createElement('div'); | ||
rootElement.id = 'my-component-root'; | ||
document.body.appendChild(rootElement); | ||
return rootElement; | ||
} | ||
|
||
|
||
|
||
function initializeMendable() { | ||
const rootElement = createRootElement(); | ||
const { MendableFloatingButton } = Mendable; | ||
|
||
|
||
const iconSpan1 = React.createElement('span', { | ||
}, '🦜'); | ||
|
||
const iconSpan2 = React.createElement('span', { | ||
}, '🔗'); | ||
|
||
const icon = React.createElement('p', { | ||
style: { color: '#ffffff', fontSize: '22px',width: '48px', height: '48px', margin: '0px', padding: '0px', display: 'flex', alignItems: 'center', justifyContent: 'center', textAlign: 'center' }, | ||
}, [iconSpan1, iconSpan2]); | ||
|
||
|
||
|
||
|
||
const mendableFloatingButton = React.createElement( | ||
MendableFloatingButton, | ||
{ | ||
style: { darkMode: false, accentColor: '#010810' }, | ||
floatingButtonStyle: { color: '#ffffff', backgroundColor: '#010810' }, | ||
anon_key: '82842b36-3ea6-49b2-9fb8-52cfc4bde6bf', // Mendable Search Public ANON key, ok to be public | ||
messageSettings: { | ||
openSourcesInNewTab: false, | ||
}, | ||
icon: icon, | ||
} | ||
); | ||
|
||
ReactDOM.render(mendableFloatingButton, rootElement); | ||
} | ||
|
||
loadScript('https://unpkg.com/react@17/umd/react.production.min.js', () => { | ||
loadScript('https://unpkg.com/react-dom@17/umd/react-dom.production.min.js', () => { | ||
loadScript('https://unpkg.com/@mendable/[email protected]/dist/umd/mendable.min.js', initializeMendable); | ||
}); | ||
}); | ||
}); |
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
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
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
1 change: 1 addition & 0 deletions
1
docs/modules/indexes/document_loaders/examples/example_data/test_repo1
Submodule test_repo1
added at
7e525a
Oops, something went wrong.