@salutejs/plasma-new-hope 0.113.0-canary.1310.10143188146.0 → 0.113.0-canary.1310.10159980270.0
Sign up to get free protection for your applications and to get access to all the features.
- package/emotion/cjs/components/Breadcrumbs/Breadcrumbs.template-doc.mdx +96 -0
- package/emotion/es/components/Breadcrumbs/Breadcrumbs.template-doc.mdx +96 -0
- package/package.json +2 -2
- package/styled-components/cjs/components/Breadcrumbs/Breadcrumbs.template-doc.mdx +96 -0
- package/styled-components/es/components/Breadcrumbs/Breadcrumbs.template-doc.mdx +96 -0
@@ -0,0 +1,96 @@
|
|
1
|
+
---
|
2
|
+
id: breadcrumbs
|
3
|
+
title: Breadcrumbs
|
4
|
+
---
|
5
|
+
|
6
|
+
import { PropsTable, Description } from '@site/src/components';
|
7
|
+
|
8
|
+
# Breadcrumbs
|
9
|
+
<PropsTable name="Breadcrumbs" />
|
10
|
+
|
11
|
+
# Обычное использование
|
12
|
+
|
13
|
+
```tsx live
|
14
|
+
import React from 'react';
|
15
|
+
import { Breadcrumbs } from '@salutejs/plasma-web';
|
16
|
+
|
17
|
+
export function App() {
|
18
|
+
const items = [
|
19
|
+
{ title: 'Home', href: '/' },
|
20
|
+
{ title: 'About as', href: '/' },
|
21
|
+
{ renderItem: () => <span>Custom Item</span> },
|
22
|
+
{ title: 'Contacts' },
|
23
|
+
];
|
24
|
+
|
25
|
+
return (
|
26
|
+
<div>
|
27
|
+
<Breadcrumbs items={items} />
|
28
|
+
</div>
|
29
|
+
);
|
30
|
+
}
|
31
|
+
```
|
32
|
+
# Использование с shorter
|
33
|
+
```tsx live
|
34
|
+
import React from 'react';
|
35
|
+
import { Breadcrumbs } from '@salutejs/plasma-web';
|
36
|
+
|
37
|
+
export function App() {
|
38
|
+
const items = [
|
39
|
+
{ title: 'Home', href: '/' },
|
40
|
+
{ title: 'About as', href: '/' },
|
41
|
+
{ renderItem: () => <span>Custom Item</span> },
|
42
|
+
{ title: 'Contacts' },
|
43
|
+
];
|
44
|
+
|
45
|
+
return (
|
46
|
+
<div style={{"flexDirection": 'column'}}>
|
47
|
+
<div>
|
48
|
+
<Breadcrumbs items={items} showItems={2} />
|
49
|
+
</div>
|
50
|
+
<div>
|
51
|
+
<Breadcrumbs items={items} showItems={3} />
|
52
|
+
</div>
|
53
|
+
</div>
|
54
|
+
);
|
55
|
+
}
|
56
|
+
```
|
57
|
+
|
58
|
+
# Использование с кастомным элементом
|
59
|
+
```tsx live
|
60
|
+
import React from 'react';
|
61
|
+
import { Breadcrumbs, Dropdown } from '@salutejs/plasma-web';
|
62
|
+
|
63
|
+
export function App() {
|
64
|
+
const items = [
|
65
|
+
{ title: 'Home', href: '/' },
|
66
|
+
{ title: 'About as', href: '/' },
|
67
|
+
{
|
68
|
+
renderItem: () => {
|
69
|
+
const itemsDropdown = [
|
70
|
+
{
|
71
|
+
value: 'Custom Item 1',
|
72
|
+
label: 'Custom Item 1',
|
73
|
+
},
|
74
|
+
{
|
75
|
+
value: 'Custom Item 2',
|
76
|
+
label: 'Custom Item 2',
|
77
|
+
},
|
78
|
+
];
|
79
|
+
return (
|
80
|
+
<Dropdown variant="tight" placement="bottom" items={itemsDropdown} trigger="hover">
|
81
|
+
<span>...</span>
|
82
|
+
</Dropdown>
|
83
|
+
);
|
84
|
+
},
|
85
|
+
},
|
86
|
+
{ title: 'Contacts' },
|
87
|
+
];
|
88
|
+
|
89
|
+
|
90
|
+
return (
|
91
|
+
<div style={{height: '200px'}}>
|
92
|
+
<Breadcrumbs items={items} />
|
93
|
+
</div>
|
94
|
+
);
|
95
|
+
}
|
96
|
+
```
|
@@ -0,0 +1,96 @@
|
|
1
|
+
---
|
2
|
+
id: breadcrumbs
|
3
|
+
title: Breadcrumbs
|
4
|
+
---
|
5
|
+
|
6
|
+
import { PropsTable, Description } from '@site/src/components';
|
7
|
+
|
8
|
+
# Breadcrumbs
|
9
|
+
<PropsTable name="Breadcrumbs" />
|
10
|
+
|
11
|
+
# Обычное использование
|
12
|
+
|
13
|
+
```tsx live
|
14
|
+
import React from 'react';
|
15
|
+
import { Breadcrumbs } from '@salutejs/plasma-web';
|
16
|
+
|
17
|
+
export function App() {
|
18
|
+
const items = [
|
19
|
+
{ title: 'Home', href: '/' },
|
20
|
+
{ title: 'About as', href: '/' },
|
21
|
+
{ renderItem: () => <span>Custom Item</span> },
|
22
|
+
{ title: 'Contacts' },
|
23
|
+
];
|
24
|
+
|
25
|
+
return (
|
26
|
+
<div>
|
27
|
+
<Breadcrumbs items={items} />
|
28
|
+
</div>
|
29
|
+
);
|
30
|
+
}
|
31
|
+
```
|
32
|
+
# Использование с shorter
|
33
|
+
```tsx live
|
34
|
+
import React from 'react';
|
35
|
+
import { Breadcrumbs } from '@salutejs/plasma-web';
|
36
|
+
|
37
|
+
export function App() {
|
38
|
+
const items = [
|
39
|
+
{ title: 'Home', href: '/' },
|
40
|
+
{ title: 'About as', href: '/' },
|
41
|
+
{ renderItem: () => <span>Custom Item</span> },
|
42
|
+
{ title: 'Contacts' },
|
43
|
+
];
|
44
|
+
|
45
|
+
return (
|
46
|
+
<div style={{"flexDirection": 'column'}}>
|
47
|
+
<div>
|
48
|
+
<Breadcrumbs items={items} showItems={2} />
|
49
|
+
</div>
|
50
|
+
<div>
|
51
|
+
<Breadcrumbs items={items} showItems={3} />
|
52
|
+
</div>
|
53
|
+
</div>
|
54
|
+
);
|
55
|
+
}
|
56
|
+
```
|
57
|
+
|
58
|
+
# Использование с кастомным элементом
|
59
|
+
```tsx live
|
60
|
+
import React from 'react';
|
61
|
+
import { Breadcrumbs, Dropdown } from '@salutejs/plasma-web';
|
62
|
+
|
63
|
+
export function App() {
|
64
|
+
const items = [
|
65
|
+
{ title: 'Home', href: '/' },
|
66
|
+
{ title: 'About as', href: '/' },
|
67
|
+
{
|
68
|
+
renderItem: () => {
|
69
|
+
const itemsDropdown = [
|
70
|
+
{
|
71
|
+
value: 'Custom Item 1',
|
72
|
+
label: 'Custom Item 1',
|
73
|
+
},
|
74
|
+
{
|
75
|
+
value: 'Custom Item 2',
|
76
|
+
label: 'Custom Item 2',
|
77
|
+
},
|
78
|
+
];
|
79
|
+
return (
|
80
|
+
<Dropdown variant="tight" placement="bottom" items={itemsDropdown} trigger="hover">
|
81
|
+
<span>...</span>
|
82
|
+
</Dropdown>
|
83
|
+
);
|
84
|
+
},
|
85
|
+
},
|
86
|
+
{ title: 'Contacts' },
|
87
|
+
];
|
88
|
+
|
89
|
+
|
90
|
+
return (
|
91
|
+
<div style={{height: '200px'}}>
|
92
|
+
<Breadcrumbs items={items} />
|
93
|
+
</div>
|
94
|
+
);
|
95
|
+
}
|
96
|
+
```
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@salutejs/plasma-new-hope",
|
3
|
-
"version": "0.113.0-canary.1310.
|
3
|
+
"version": "0.113.0-canary.1310.10159980270.0",
|
4
4
|
"description": "Salute Design System blueprint",
|
5
5
|
"main": "cjs/index.js",
|
6
6
|
"module": "es/index.js",
|
@@ -118,5 +118,5 @@
|
|
118
118
|
"react-popper": "2.3.0",
|
119
119
|
"storeon": "3.1.5"
|
120
120
|
},
|
121
|
-
"gitHead": "
|
121
|
+
"gitHead": "cdb6bb109695bd82a647fd71ed83fd1da6f7aebd"
|
122
122
|
}
|
@@ -0,0 +1,96 @@
|
|
1
|
+
---
|
2
|
+
id: breadcrumbs
|
3
|
+
title: Breadcrumbs
|
4
|
+
---
|
5
|
+
|
6
|
+
import { PropsTable, Description } from '@site/src/components';
|
7
|
+
|
8
|
+
# Breadcrumbs
|
9
|
+
<PropsTable name="Breadcrumbs" />
|
10
|
+
|
11
|
+
# Обычное использование
|
12
|
+
|
13
|
+
```tsx live
|
14
|
+
import React from 'react';
|
15
|
+
import { Breadcrumbs } from '@salutejs/plasma-web';
|
16
|
+
|
17
|
+
export function App() {
|
18
|
+
const items = [
|
19
|
+
{ title: 'Home', href: '/' },
|
20
|
+
{ title: 'About as', href: '/' },
|
21
|
+
{ renderItem: () => <span>Custom Item</span> },
|
22
|
+
{ title: 'Contacts' },
|
23
|
+
];
|
24
|
+
|
25
|
+
return (
|
26
|
+
<div>
|
27
|
+
<Breadcrumbs items={items} />
|
28
|
+
</div>
|
29
|
+
);
|
30
|
+
}
|
31
|
+
```
|
32
|
+
# Использование с shorter
|
33
|
+
```tsx live
|
34
|
+
import React from 'react';
|
35
|
+
import { Breadcrumbs } from '@salutejs/plasma-web';
|
36
|
+
|
37
|
+
export function App() {
|
38
|
+
const items = [
|
39
|
+
{ title: 'Home', href: '/' },
|
40
|
+
{ title: 'About as', href: '/' },
|
41
|
+
{ renderItem: () => <span>Custom Item</span> },
|
42
|
+
{ title: 'Contacts' },
|
43
|
+
];
|
44
|
+
|
45
|
+
return (
|
46
|
+
<div style={{"flexDirection": 'column'}}>
|
47
|
+
<div>
|
48
|
+
<Breadcrumbs items={items} showItems={2} />
|
49
|
+
</div>
|
50
|
+
<div>
|
51
|
+
<Breadcrumbs items={items} showItems={3} />
|
52
|
+
</div>
|
53
|
+
</div>
|
54
|
+
);
|
55
|
+
}
|
56
|
+
```
|
57
|
+
|
58
|
+
# Использование с кастомным элементом
|
59
|
+
```tsx live
|
60
|
+
import React from 'react';
|
61
|
+
import { Breadcrumbs, Dropdown } from '@salutejs/plasma-web';
|
62
|
+
|
63
|
+
export function App() {
|
64
|
+
const items = [
|
65
|
+
{ title: 'Home', href: '/' },
|
66
|
+
{ title: 'About as', href: '/' },
|
67
|
+
{
|
68
|
+
renderItem: () => {
|
69
|
+
const itemsDropdown = [
|
70
|
+
{
|
71
|
+
value: 'Custom Item 1',
|
72
|
+
label: 'Custom Item 1',
|
73
|
+
},
|
74
|
+
{
|
75
|
+
value: 'Custom Item 2',
|
76
|
+
label: 'Custom Item 2',
|
77
|
+
},
|
78
|
+
];
|
79
|
+
return (
|
80
|
+
<Dropdown variant="tight" placement="bottom" items={itemsDropdown} trigger="hover">
|
81
|
+
<span>...</span>
|
82
|
+
</Dropdown>
|
83
|
+
);
|
84
|
+
},
|
85
|
+
},
|
86
|
+
{ title: 'Contacts' },
|
87
|
+
];
|
88
|
+
|
89
|
+
|
90
|
+
return (
|
91
|
+
<div style={{height: '200px'}}>
|
92
|
+
<Breadcrumbs items={items} />
|
93
|
+
</div>
|
94
|
+
);
|
95
|
+
}
|
96
|
+
```
|
@@ -0,0 +1,96 @@
|
|
1
|
+
---
|
2
|
+
id: breadcrumbs
|
3
|
+
title: Breadcrumbs
|
4
|
+
---
|
5
|
+
|
6
|
+
import { PropsTable, Description } from '@site/src/components';
|
7
|
+
|
8
|
+
# Breadcrumbs
|
9
|
+
<PropsTable name="Breadcrumbs" />
|
10
|
+
|
11
|
+
# Обычное использование
|
12
|
+
|
13
|
+
```tsx live
|
14
|
+
import React from 'react';
|
15
|
+
import { Breadcrumbs } from '@salutejs/plasma-web';
|
16
|
+
|
17
|
+
export function App() {
|
18
|
+
const items = [
|
19
|
+
{ title: 'Home', href: '/' },
|
20
|
+
{ title: 'About as', href: '/' },
|
21
|
+
{ renderItem: () => <span>Custom Item</span> },
|
22
|
+
{ title: 'Contacts' },
|
23
|
+
];
|
24
|
+
|
25
|
+
return (
|
26
|
+
<div>
|
27
|
+
<Breadcrumbs items={items} />
|
28
|
+
</div>
|
29
|
+
);
|
30
|
+
}
|
31
|
+
```
|
32
|
+
# Использование с shorter
|
33
|
+
```tsx live
|
34
|
+
import React from 'react';
|
35
|
+
import { Breadcrumbs } from '@salutejs/plasma-web';
|
36
|
+
|
37
|
+
export function App() {
|
38
|
+
const items = [
|
39
|
+
{ title: 'Home', href: '/' },
|
40
|
+
{ title: 'About as', href: '/' },
|
41
|
+
{ renderItem: () => <span>Custom Item</span> },
|
42
|
+
{ title: 'Contacts' },
|
43
|
+
];
|
44
|
+
|
45
|
+
return (
|
46
|
+
<div style={{"flexDirection": 'column'}}>
|
47
|
+
<div>
|
48
|
+
<Breadcrumbs items={items} showItems={2} />
|
49
|
+
</div>
|
50
|
+
<div>
|
51
|
+
<Breadcrumbs items={items} showItems={3} />
|
52
|
+
</div>
|
53
|
+
</div>
|
54
|
+
);
|
55
|
+
}
|
56
|
+
```
|
57
|
+
|
58
|
+
# Использование с кастомным элементом
|
59
|
+
```tsx live
|
60
|
+
import React from 'react';
|
61
|
+
import { Breadcrumbs, Dropdown } from '@salutejs/plasma-web';
|
62
|
+
|
63
|
+
export function App() {
|
64
|
+
const items = [
|
65
|
+
{ title: 'Home', href: '/' },
|
66
|
+
{ title: 'About as', href: '/' },
|
67
|
+
{
|
68
|
+
renderItem: () => {
|
69
|
+
const itemsDropdown = [
|
70
|
+
{
|
71
|
+
value: 'Custom Item 1',
|
72
|
+
label: 'Custom Item 1',
|
73
|
+
},
|
74
|
+
{
|
75
|
+
value: 'Custom Item 2',
|
76
|
+
label: 'Custom Item 2',
|
77
|
+
},
|
78
|
+
];
|
79
|
+
return (
|
80
|
+
<Dropdown variant="tight" placement="bottom" items={itemsDropdown} trigger="hover">
|
81
|
+
<span>...</span>
|
82
|
+
</Dropdown>
|
83
|
+
);
|
84
|
+
},
|
85
|
+
},
|
86
|
+
{ title: 'Contacts' },
|
87
|
+
];
|
88
|
+
|
89
|
+
|
90
|
+
return (
|
91
|
+
<div style={{height: '200px'}}>
|
92
|
+
<Breadcrumbs items={items} />
|
93
|
+
</div>
|
94
|
+
);
|
95
|
+
}
|
96
|
+
```
|