@jswork/react-questkit 0.0.0-stage → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,33 @@
1
- # Temporary Holding Version
1
+ # react-questkit
2
+ > Mobile-first React component library for interactive homework experiences.
2
3
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
4
+ ## installation
5
+ ```shell
6
+ pnpm add @jswork/react-questkit
7
+ ```
8
+
9
+ ## usage
10
+ ```tsx
11
+ import { QuestConfigProvider, SingleChoice } from '@jswork/react-questkit';
12
+ import '@jswork/react-questkit/style.css';
13
+
14
+ export function Question() {
15
+ return (
16
+ <QuestConfigProvider config={{ sound: false }}>
17
+ <SingleChoice
18
+ data={{
19
+ stem: 'I have ___ apple.',
20
+ options: [{ text: 'a' }, { text: 'an' }, { text: 'the' }],
21
+ answer: 1,
22
+ }}
23
+ onSubmit={(result) => console.log(result)}
24
+ />
25
+ </QuestConfigProvider>
26
+ );
27
+ }
28
+ ```
29
+
30
+ 13 题型、三态矩阵、数据模型与样式定制见 [docs/questkit/usage.md](../../docs/questkit/usage.md)。
31
+
32
+ ## license
33
+ Code released under [the MIT license](https://github.com/afeiship/react-questkit/blob/master/LICENSE.txt).