hanki-lanyard 0.1.0
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 +56 -0
- package/dist/index.cjs +1912 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +188 -0
- package/dist/index.d.ts +188 -0
- package/dist/index.js +1881 -0
- package/dist/index.js.map +1 -0
- package/package.json +50 -0
package/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# hanki-lanyard
|
|
2
|
+
|
|
3
|
+
Interactive 3D lanyard badge card for React apps, with Typeform-style sign-in / sign-up flows.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install hanki-lanyard qrcode.react
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Peer dependencies: `react`, `react-dom`, `qrcode.react`
|
|
12
|
+
|
|
13
|
+
## Publish (maintainers)
|
|
14
|
+
|
|
15
|
+
From this directory, with npm logged in:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm publish
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The package is **public** on npm. (`publishConfig.access` is set to `public`.)
|
|
22
|
+
|
|
23
|
+
> **Note:** GitHub repo ownership and npm package names are separate systems.
|
|
24
|
+
> The npm org `@hanki` is a different account/organization on [npmjs.com](https://www.npmjs.com).
|
|
25
|
+
> This package publishes as **`hanki-lanyard`** so any npm account can publish it.
|
|
26
|
+
> To use `@hanki/lanyard` later, you must own or be invited to the `@hanki` org on npm.
|
|
27
|
+
|
|
28
|
+
## Quick start
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
import { LanyardScene } from 'hanki-lanyard'
|
|
32
|
+
|
|
33
|
+
export default function AuthPage() {
|
|
34
|
+
return (
|
|
35
|
+
<LanyardScene
|
|
36
|
+
showConfigPanel={false}
|
|
37
|
+
auth={{
|
|
38
|
+
onSubmit: async ({ mode, values, isComplete }) => {
|
|
39
|
+
if (!isComplete) return
|
|
40
|
+
console.log(mode, values)
|
|
41
|
+
},
|
|
42
|
+
}}
|
|
43
|
+
/>
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Local demo (monorepo)
|
|
49
|
+
|
|
50
|
+
In `lanyardtest/package.json`:
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
"hanki-lanyard": "file:../packages/hanki-lanyard/hanki-lanyard-0.1.0.tgz"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
After changing source: `npm run build` in this folder, then `npm run build:pkg` in `lanyardtest/`.
|