@meduza/ui-kit-2 0.5.5 → 0.6.6
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/dist/ChapterBlock/ChapterBlock.types.d.ts +1 -0
- package/dist/Tag/Tag.types.d.ts +1 -1
- package/dist/ui-kit-2.cjs.development.js +5 -2
- package/dist/ui-kit-2.cjs.development.js.map +1 -1
- package/dist/ui-kit-2.cjs.production.min.js +1 -1
- package/dist/ui-kit-2.cjs.production.min.js.map +1 -1
- package/dist/ui-kit-2.esm.js +5 -2
- package/dist/ui-kit-2.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/ChapterBlock/ChapterBlock.module.css +7 -0
- package/src/ChapterBlock/ChapterBlock.types.ts +1 -0
- package/src/ChapterBlock/index.tsx +3 -1
- package/src/RenderBlocks/index.tsx +1 -1
- package/src/SimpleBlock/SimpleBlock.module.css +18 -0
- package/src/Tag/Tag.types.ts +1 -1
package/package.json
CHANGED
|
@@ -5,11 +5,13 @@ import styles from './ChapterBlock.module.css'
|
|
|
5
5
|
|
|
6
6
|
export const ChapterBlock: React.FC<ChapterBlockProps> = ({
|
|
7
7
|
block: { data, only_on: onlyOn },
|
|
8
|
-
styleContext
|
|
8
|
+
styleContext,
|
|
9
|
+
id
|
|
9
10
|
}) => {
|
|
10
11
|
return (
|
|
11
12
|
<div
|
|
12
13
|
data-testid="chapter-block"
|
|
14
|
+
id={id}
|
|
13
15
|
className={makeClassName([
|
|
14
16
|
[styles.root, true],
|
|
15
17
|
[styles[onlyOn], !!onlyOn]
|
|
@@ -86,7 +86,7 @@ export const RenderBlocks: React.FC<RenderBlocksProps> = ({
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
case 'chapter-subtitle': {
|
|
89
|
-
return <ChapterBlock block={block} styleContext={styleContext} />
|
|
89
|
+
return <ChapterBlock block={block} styleContext={styleContext} id={block.id} />
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
case 'card_title': {
|
|
@@ -68,6 +68,12 @@
|
|
|
68
68
|
font-family: $primaryFont;
|
|
69
69
|
line-height: calc(28rem / 16);
|
|
70
70
|
|
|
71
|
+
scroll-margin: 40px;
|
|
72
|
+
|
|
73
|
+
@media $landscapeTablet {
|
|
74
|
+
scroll-margin: 70px;
|
|
75
|
+
}
|
|
76
|
+
|
|
71
77
|
@media $mobile {
|
|
72
78
|
margin: 0 0 45px;
|
|
73
79
|
|
|
@@ -94,6 +100,12 @@
|
|
|
94
100
|
font-family: $secondaryFont;
|
|
95
101
|
line-height: calc(24rem / 16);
|
|
96
102
|
|
|
103
|
+
scroll-margin: 40px;
|
|
104
|
+
|
|
105
|
+
@media $landscapeTablet {
|
|
106
|
+
scroll-margin: 70px;
|
|
107
|
+
}
|
|
108
|
+
|
|
97
109
|
@media $mobile {
|
|
98
110
|
margin-top: 45px;
|
|
99
111
|
margin-bottom: 15px;
|
|
@@ -113,6 +125,12 @@
|
|
|
113
125
|
font-family: $secondaryFont;
|
|
114
126
|
line-height: calc(21rem / 16);
|
|
115
127
|
|
|
128
|
+
scroll-margin: 40px;
|
|
129
|
+
|
|
130
|
+
@media $landscapeTablet {
|
|
131
|
+
scroll-margin: 70px;
|
|
132
|
+
}
|
|
133
|
+
|
|
116
134
|
@media $mobile {
|
|
117
135
|
margin-top: 45px;
|
|
118
136
|
margin-bottom: 15px;
|
package/src/Tag/Tag.types.ts
CHANGED
|
@@ -2,7 +2,7 @@ import React from 'react'
|
|
|
2
2
|
|
|
3
3
|
export type TagSizes = 'small' | 'large'
|
|
4
4
|
|
|
5
|
-
export type TagThemes = 'dark' | 'gold' | 'gray' | 'light' | 'inherit'
|
|
5
|
+
export type TagThemes = 'dark' | 'gold' | 'gray' | 'light' | 'inherit' | 'custom'
|
|
6
6
|
|
|
7
7
|
export type TagStyleContexts = 'isInToolbar' | 'isInSpoiler' | 'isInDropdown'
|
|
8
8
|
|