npm.io
0.0.5 • Published 7 years ago

solid-vue-components.logged-in

Licence
MIT
Version
0.0.5
Deps
0
Size
2.3 MB
Vulns
0
Weekly
0
Stars
1

solid-vue-components.logged-in

Pane that only shows its contents when the user is logged in.

Installation

Directly in the browser

Drop the component in with a <script> tag alongside Vue:

<div id="app">
<!-- ... use component here ... -->
</div>

<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/solid-vue-components.logged-in"></script>
<script>
new Vue({ el: '#app' })
</script>
In a module system

Install the component with NPM:

npm install solid-vue-components.logged-in

Then import the component:

import LoggedIn from 'solid-vue-components.logged-in'

And either globally register it for use in all components:

Vue.component(LoggedIn, 'solid-vue-components.logged-in')

or locally register it for use in an individual component:

export default {
components: { LoggedIn }
}

Usage

<LoggedIn>
  <p>This is only visible for logged in users.</p>
</LoggedIn>