You've already forked AstralRinth
forked from didirus/AstralRinth
Share modal (#74)
* Creation of the share modal * Update package.json * Addressed comments * Fixed dependency * Update ShareModal.vue * Fixed url * Update ShareModal.vue * Adressed changes
This commit is contained in:
@@ -44,6 +44,7 @@ export default {
|
||||
{ text: 'Markdown', link: '/components/markdown' },
|
||||
{ text: 'Copy Code', link: '/components/copy-code' },
|
||||
{ text: 'Notifications', link: '/components/notifications' },
|
||||
{ text: 'Share Modal', link: '/components/share-modal' },
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
44
docs/components/share-modal.md
Normal file
44
docs/components/share-modal.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# Share Modal
|
||||
|
||||
<DemoContainer>
|
||||
<Button @click="$refs.shareContent.show('This is content')">
|
||||
<EditIcon/>
|
||||
Share Content
|
||||
</Button>
|
||||
<Button @click="$refs.shareLink.show('https://modrinth.com')">
|
||||
<GlobeIcon/>
|
||||
Share Link
|
||||
</Button>
|
||||
<ShareModal
|
||||
ref="shareContent"
|
||||
share-title="This is the title for the content"
|
||||
share-text="Share this content"
|
||||
/>
|
||||
<ShareModal
|
||||
ref="shareLink"
|
||||
share-title="This is the title for the link"
|
||||
share-text="Share this link"
|
||||
link
|
||||
/>
|
||||
</DemoContainer>
|
||||
|
||||
```vue
|
||||
<ShareModal
|
||||
ref="shareContent"
|
||||
share-title="This is the title for the content"
|
||||
share-text="Share this content"
|
||||
/>
|
||||
<ShareModal
|
||||
ref="shareLink"
|
||||
share-title="This is the title for the link"
|
||||
share-text="Share this link"
|
||||
link
|
||||
/>
|
||||
|
||||
```
|
||||
You can use ref to open the modal, calling the show method
|
||||
|
||||
`content` is what will be shown in the text of the input for sharing
|
||||
```text
|
||||
$refs.shareContent.show(content)
|
||||
```
|
||||
Reference in New Issue
Block a user