Callback
You can run functions after the Style Guide has been initialized. Push directly to the global window.styleGuideCallbacks
array variable a callback function, or use the StyleGuide.addCallback()
function.
<script>
window.styleGuideCallbacks = window.styleGuideCallbacks || [];
window.styleGuideCallbacks.push(() => { console.log('do stuff'); });
</script>
import { StyleGuide } from '@finanzen-net/common-styles/dist/script-net';
StyleGuide.addCallback(() => { console.log('do stuff'); });