Skip to content

Commit

Permalink
docs(usage): minor fix [KHCP-11958]
Browse files Browse the repository at this point in the history
  • Loading branch information
portikM committed Jun 14, 2024
1 parent 8d29ab7 commit 74aa442
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/guide/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,23 +68,23 @@ Import and registration can be done individually in the app entry file (e.g. `ma
```ts
// main.ts (or Vue entry file)

import { createApp } from 'vue'
import { KButton } from '@kong/kongponents'
// Kongponents rely on vue-bind-once directive to work properly
// The Kongponents bundle includes the vue-bind-once package so you won't need to install it separately, but it does need to be registered
import { BindOncePlugin } from 'vue-bind-once'
import { createApp } from 'vue'
import { KButton } from '@kong/kongponents'
import '@kong/kongponents/dist/style.css'
// If using Vue-CLI and webpack, you can likely use
// this path instead: import '~@kong/kongponents/dist/style.css'

const app = createApp(App)

// Register an individual Kongponent
app.component('KButton', KButton)

// Register the vue-bind-once directive as a Vue Plugin
app.use(BindOncePlugin)

// Register an individual Kongponent
app.component('KButton', KButton)

app.mount('#app')
```

Expand Down

0 comments on commit 74aa442

Please sign in to comment.