@empathyco/x-components
Version:
Empathy X Components
49 lines (37 loc) • 1.87 kB
Markdown
---
title: SnippetConfigExtraParams
---
# SnippetConfigExtraParams
## Props
| Name | Description | Type | Default |
| -------------------------------- | ----------- | --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <code>values</code> | | <code>Dictionary<unknown></code> | <code></code> |
| <code>excludedExtraParams</code> | | <code>Array<keyof SnippetConfig></code> | <code>(): Array<keyof SnippetConfig> => [<br /> 'callbacks',<br /> 'productId',<br /> 'uiLang',<br /> 'consent',<br /> 'documentDirection',<br /> 'filters',<br /> 'isSpa',<br /> 'queriesPreview',<br />]</code> |
## See it in action
_See how the snippet config is injected and passed to the SnippetConfigExtraParams component._
```vue
<template>
<Provider>
<SnippetConfigExtraParams />
</Provider>
</template>
<script>
import { SnippetConfigExtraParams } from '@empathyco/x-components/extra-params'
const Provider = {
provide: {
snippetConfig: {
instance: 'demo',
lang: 'es',
warehouse: 1234,
},
},
}
export default {
name: 'SnippetConfigExtraParamsDemo',
components: {
Provider,
SnippetConfigExtraParams,
},
}
</script>
```