Socket
Book a DemoInstallSign in
Socket

@imjohnbon/polls-test

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@imjohnbon/polls-test

## Install

0.10.0
latest
npmnpm
Version published
Weekly downloads
7
600%
Maintainers
1
Weekly downloads
 
Created
Source

easy-static-polls

Install

NPM

First, install easy-static-polls via your preferred package manager:

$ npm install easy-static-polls --save

Then register any relevant components in your JavaScript:

import Vue from 'vue'
import { Poll, RenderlessPoll } from 'easy-static-polls'

Vue.component('poll', Poll)
Vue.component('renderless-poll', RenderlessPoll)

Now you can use the components in your markup:

<poll :choices="{ 'banana': 'Banana', 'apple': 'Apple' }"></poll>

CDN

Simply include vue & easy-static-polls.js - we recommend using unpkg.

<script src="https://unpkg.com/vue@latest"></script>
<!-- use the latest release -->
<script src="https://unpkg.com/easy-static-polls@latest"></script>
<!-- or point to a specific release -->
<script src="https://unpkg.com/easy-static-polls@1.0.0"></script>

Then register any relevant components in your JavaScript:

Vue.component('poll', easyStaticPolls.Poll);
Vue.component('renderless-poll', easyStaticPolls.RenderlessPoll);

Now you can use the components in your markup:

<poll :choices="{ 'banana': 'Banana', 'apple': 'Apple' }"></poll >

Here's an example on JSBin.

Usage

Props

NameTypeDefault ValueDescription
afterSubmitHookFunctionEmpty functionDescription
allowCustomAnswerBooleanfalseNotification's body message. Normally should be set up
buttonTextString'Submit Answer'time before notifications gone
choicesObjectEmpty objectCallback function
customAnswerLabelObjectEmpty objectCallback function
endpointStringundefinedCallback function
fieldGoalFormKeyStringundefinedCallback function
multipleChoiceBooleanfalseCallback function
onSubmitErrorHookFunctionEmpty functionCallback function
requestConfigObjectEmpty objectCallback function
thankYouMessageString'Your answer has been submitted.'Callback function

FAQs

Package last updated on 13 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.