Skip to content

Commit f70179c

Browse files
authored
Merge pull request #191 from sboldyreva/componentsusage
Added a file with info how to use components
2 parents 3cad50f + d1441ce commit f70179c

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
## Components: CodeWithCopy
2+
3+
**Description**:
4+
- Adds copy button to a code.
5+
- Suitable for both single/multiple lines in a *code-block*
6+
7+
**Known issues**:
8+
- Doesn't look nice on long code-lines, copy button overlays code. It's better to break such lines to several.
9+
10+
**Usage example**:
11+
12+
<CodeWithCopy>
13+
14+
```text
15+
CODE
16+
```
17+
18+
</CodeWithCopy>
19+
20+
## Components: CodeTabs
21+
22+
**Description**:
23+
24+
- Designed to combine code, for example, one-purpose commands for different Linux systems.
25+
- Has a built-in copy button and scroll.
26+
27+
**Usage example**:
28+
29+
- Single line
30+
31+
<CodeTabs :tabs="[
32+
{ title: 'Option-1', content: `CODE` },
33+
{ title: 'Option-2', content: `CODE` }
34+
]" />
35+
36+
- Multiple lines
37+
38+
<CodeTabs :tabs="[
39+
{ title: 'Option-1', content:
40+
`CODE
41+
CODE
42+
CODE` },
43+
{ title: 'Option-2', content:
44+
`CODE
45+
CODE
46+
CODE` }
47+
]" />
48+
49+
## Components: TableTabs
50+
51+
**Description**:
52+
53+
- Designed to combine content (version-tables, text informtation, etc).
54+
- Lines help distinguish interactive content beginning and finish.
55+
- Has a drop-down selector to choose what content to show.
56+
- Each option in selector has a anchor to be able to get an individual link and send it to another person who will see the respective content when clicking the link.
57+
- A `label` can be added before selector as an option intro-phrase like *Choose version*.
58+
- Dropdown item names are written in respective templates as `#XX_YY_ZZ`, when rendering `_` will be replaced with space ` `.
59+
60+
**Known issues**:
61+
62+
- Headings *inside* a selector option loose their linkability so instead better to proived to another person a link to the entire option.
63+
64+
**Usage example**:
65+
66+
<TableTabs label="Choose an extension: " >
67+
68+
<template #Extension_1>
69+
70+
Any your content.
71+
72+
</template>
73+
74+
<template #Extension_2>
75+
76+
Any your content.
77+
78+
</template>
79+
80+
</TableTabs>

0 commit comments

Comments
 (0)