@konemono/nostr-share-component 0.0.18 → 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 +9 -4
- package/dist/nostr-share-component.es.js +830 -745
- package/dist/nostr-share-component.js +16 -13
- package/dist/nostr-share-component.umd.js +16 -13
- package/package.json +2 -1
- package/dist/icons.d.ts +0 -4
package/README.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
# nostr-share-component
|
|
2
1
|
|
|
2
|
+
# nostr-share-component
|
|
3
|
+
[](https://www.jsdelivr.com/package/npm/@konemono/nostr-share-component)
|
|
3
4
|
|
|
4
5
|
``<head>``に以下のコードを各。{version}の部分は適切なバージョンに変更してください(e.g. 0.0.10)
|
|
5
6
|
|
|
@@ -14,15 +15,19 @@ https://cdn.jsdelivr.net/npm/@konemono/nostr-share-component@{version}/dist/nost
|
|
|
14
15
|
{url}{title}{text}はそれぞれ共有したい文字列に変換
|
|
15
16
|
(なくても良い)
|
|
16
17
|
|
|
18
|
+
urlもtitleもtextもない場合は設置したサイトのURLとtitleが共有されます。
|
|
19
|
+
|
|
17
20
|
icon={true}にすると◯サイズのボタン(なくても良い。defaultはfalse)
|
|
18
21
|
|
|
19
22
|
|
|
20
23
|
```
|
|
21
|
-
<nostr-share url={url}
|
|
24
|
+
<nostr-share data-url={url} data-title={title} data-text={text} data-type={buttonType} ></nostr-share>
|
|
22
25
|
```
|
|
23
26
|
|
|
27
|
+
buttonType は mini か icon (指定なしだと default)
|
|
28
|
+
|
|
24
29
|
中に任意のコンテントをいれると共有ボタンがカスタムできる
|
|
25
30
|
|
|
26
31
|
```
|
|
27
|
-
<nostr-share style="" url={url} shareTitle={title} text={text}
|
|
28
|
-
```
|
|
32
|
+
<nostr-share style="" url={url} shareTitle={title} text={text} >Share on Nostr</nostr-share>
|
|
33
|
+
```
|