@konemono/nostr-share-component 0.0.18 → 0.1.1

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,5 +1,6 @@
1
- # nostr-share-component
2
1
 
2
+ # nostr-share-component
3
+ [![](https://data.jsdelivr.com/v1/package/npm/@konemono/nostr-share-component/badge)](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,17 @@ https://cdn.jsdelivr.net/npm/@konemono/nostr-share-component@{version}/dist/nost
14
15
  {url}{title}{text}はそれぞれ共有したい文字列に変換
15
16
  (なくても良い)
16
17
 
17
- icon={true}にすると◯サイズのボタン(なくても良い。defaultはfalse)
18
+ urlもtitleもtextもない場合は設置したサイトのURLとtitleが共有されます。
18
19
 
19
20
 
20
21
  ```
21
- <nostr-share url={url} shareTitle={title} text={text} icon={true} ></nostr-share>
22
+ <nostr-share data-url={url} data-title={title} data-text={text} data-type={buttonType} ></nostr-share>
22
23
  ```
23
24
 
25
+ buttonType は mini か icon (指定なしだと default)
26
+
24
27
  中に任意のコンテントをいれると共有ボタンがカスタムできる
25
28
 
26
29
  ```
27
- <nostr-share style="" url={url} shareTitle={title} text={text} icon={true}>Share on Nostr</nostr-share>
28
- ```
30
+ <nostr-share style="" data-url={url} data-title={title} data-text={text} >Share on Nostr</nostr-share>
31
+ ```