Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit a5d6041

Browse files
doc(#9): add documentation about components
1 parent 460e0e9 commit a5d6041

File tree

2 files changed

+63
-1
lines changed

2 files changed

+63
-1
lines changed

doc/components/components.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# DeckDeckGo - Extra Components
2+
3+
[DeckDeckGo] provide a couple of extra components which could be use in any slides of your presentation.
4+
5+
## Table of contents
6+
7+
- [Social](#social)
8+
9+
## Social
10+
11+
The "Social" component allows you to easily add a social link to your presentation.
12+
13+
### Usage
14+
15+
The "Social" slide's Web Component could be integrated using the tag `<deckgo-social/>`.
16+
17+
```
18+
<deckgo-social twitter="daviddalbusco">
19+
<img data-src="/assets/twitter.svg" slot="icon"/>
20+
twitter
21+
</deckgo-social>
22+
```
23+
24+
#### Slots
25+
26+
The slot `icon` and the text are both optional. Of course, if you provide nothing, nothing will be rendered.
27+
28+
### Attributes
29+
30+
This component offers the following options which could be set using attributes:
31+
32+
| Attribute | Type | Default | Description |
33+
| -------------------------- |:-----------------:|:-----------------:|:-----------------:|
34+
| twitter | string | | Your Twitter username. It will be concatenated automatically with `https://twitter.com/` |
35+
| linkedin | string | | Your Linkedin username. It will be concatenated automatically with `https://www.linkedin.com/in/` |
36+
| medium | string | | Your Medium username. It will be concatenated automatically with `https://medium.com/@` |
37+
| github | string | | Your Github username. It will be concatenated automatically with `https://github.com/` |
38+
| fullUrl | string | | In case you would like to provide the URI of your choice |
39+
40+
### Examples
41+
42+
Without any icons:
43+
44+
```
45+
<deckgo-social twitter="daviddalbusco">Twitter</deckgo-social>
46+
<deckgo-social linkedin="david-dal-busco/">Linkedin</deckgo-social>
47+
<deckgo-social medium="david.dalbusco">Medium</deckgo-social>
48+
<deckgo-social full-url="https://stackoverflow.com/users/5404186/peter-parker">Stackoverflow</deckgo-social>
49+
```
50+
51+
With for example `ion-icon`:
52+
53+
```
54+
<deckgo-social twitter="daviddalbusco"><ion-icon slot="icon" name="logo-twitter"></ion-icon> Twitter</deckgo-social>
55+
<deckgo-social github="fluster/deckdeckgo"><ion-icon slot="icon" name="logo-github"></ion-icon> DeckDeckGo on Github</deckgo-social>
56+
```
57+
58+
[DeckDeckGo]: https://deckdeckgo.com

doc/slides/slides.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,11 @@ Notes:
356356

357357
* The slot `title` is hidden. If you use the [DeckDeckGo] starter, it will be use for the navigation modal
358358

359-
* You could provide up to six `social-link` slots
359+
* You could provide up to six `social-link` slots. Each of these could be your custom code or you could use the component `<deckgo-social/>` to easily provide a link to an external URI.
360+
361+
#### Social components
362+
363+
The details of the component `<deckgo-social/>` is described in the components [documentation](doc/components/components.md).
360364

361365
### Attributes
362366

0 commit comments

Comments
 (0)