From 2292e2f6ca9d7659b248492ee447c269b346159a Mon Sep 17 00:00:00 2001 From: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:06:30 +0200 Subject: [PATCH] feat(onboarding): Vue and Svelte snippets (#8250) --- .../onboarding/dialog/snippets/svelte.md | 35 +++++++++++---- .../onboarding/dialog/snippets/vue.md | 43 +++++++++++++------ 2 files changed, 56 insertions(+), 22 deletions(-) diff --git a/frontend/src/component/onboarding/dialog/snippets/svelte.md b/frontend/src/component/onboarding/dialog/snippets/svelte.md index 43b6b6ad58e1..edf27198190d 100644 --- a/frontend/src/component/onboarding/dialog/snippets/svelte.md +++ b/frontend/src/component/onboarding/dialog/snippets/svelte.md @@ -5,18 +5,37 @@ npm install @unleash/proxy-client-svelte 2\. Initialize Unleash ```svelte - + +
+ +
+ +
+
+
+``` + +3\. Check feature flag status +```svelte + - - - +
+

+ {$enabled ? 'Feature is enabled!' : 'Feature is disabled!'} +

+
``` diff --git a/frontend/src/component/onboarding/dialog/snippets/vue.md b/frontend/src/component/onboarding/dialog/snippets/vue.md index 0a6c44954eca..87b5bee36bce 100644 --- a/frontend/src/component/onboarding/dialog/snippets/vue.md +++ b/frontend/src/component/onboarding/dialog/snippets/vue.md @@ -4,21 +4,36 @@ npm install @unleash/proxy-client-vue ``` 2\. Initialize Unleash +```vue + -const config = { - url: '', - clientKey: '', - refreshInterval: 15, - appName: 'unleash-onboarding-vue', -} + +``` + +3\. Check feature flag status +```vue + -const app = createApp(App) -app.use(unleashPlugin, { config }) -app.mount('#app') + ```