0.3.4 • Published 1 year ago

@coxdev/cox-quiz v0.3.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@coxdev/cox-quiz

Installation

npm i lit @coxdev/cox-quiz

Options

The configuration component can contain the following reactive properties:

  • question (required): An object or a JSON string
    • name: An string, The name for question
    • answers: An array of string
  • correctAnswer: An String

Example:

<cox-quiz question='{"name": "How old are you ??", "answers": ["15", "18", "24", "25"]}' correctAnswer="24"></cox-quiz>

Usage

Vanilla Js

index.html

<body>
  ...
  <!-- If you want to add a quiz. -->
  <cox-quiz question='{"name": "How old are you ??", "answers": ["15", "18", "24", "25"]}' correctAnswer="24"></cox-quiz>
  <script type="module">
    import "@coxdev/cox-quiz";
  </script>
</body>

Running

npm run dev

HTTP Server or Live Server

index.html

<body>
  ...
  <!-- If you want to add a quiz. -->
  <cox-quiz question='{"name": "How old are you ??", "answers": ["15", "18", "24", "25"]}' correctAnswer="24"></cox-quiz>
  <script type="module" src="node_modules/@coxdev/cox-quiz/build/cox-quiz.min.js"></script>
</body>

http-server Running

http-server [path] [options]

live-server Running

Right click to index.html file and choose 'Open with live server'

0.3.4

1 year ago

0.3.0

2 years ago

0.2.7

2 years ago

0.2.6

2 years ago

0.2.9

2 years ago

0.2.8

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.2.5

2 years ago

0.3.3

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.9

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.4

2 years ago

0.1.8

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago