@jetbrains/kotlin-web-site-ui 0.0.0-foundation-changes.3 → 0.0.0-foundation-changes.5
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.
|
@@ -17,9 +17,3 @@
|
|
|
17
17
|
.ktl-cta-block-module_layout_J-jWe .ktl-cta-block-module_top-title_ve70f:last-child, .ktl-cta-block-module_layout_J-jWe .ktl-cta-block-module_main-title_JbxBG:last-child, .ktl-cta-block-module_layout_J-jWe .ktl-cta-block-module_content_lCnnn:last-child, .ktl-cta-block-module_layout_J-jWe .ktl-cta-block-module_buttons_ObAIt:last-child {
|
|
18
18
|
margin-bottom: 0;
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
.ktl-cta-block-module_top-title_ve70f {
|
|
22
|
-
font-size: 16px;
|
|
23
|
-
line-height: 24px;
|
|
24
|
-
}
|
|
25
|
-
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import cn from 'classnames';
|
|
4
|
-
import {
|
|
4
|
+
import { ThemeProvider } from '@rescui/ui-contexts';
|
|
5
|
+
import { useTextStyles } from '@rescui/typography';
|
|
5
6
|
import styles from './cta-block.module.pcss.js';
|
|
6
7
|
|
|
7
|
-
function
|
|
8
|
+
function Cta({
|
|
8
9
|
className,
|
|
9
|
-
theme,
|
|
10
10
|
classTopTitle,
|
|
11
11
|
topTitle,
|
|
12
12
|
classMainTitle,
|
|
@@ -16,15 +16,17 @@ function CtaBlock({
|
|
|
16
16
|
classButtons,
|
|
17
17
|
buttons
|
|
18
18
|
}) {
|
|
19
|
-
const textCn = useTextStyles(
|
|
19
|
+
const textCn = useTextStyles();
|
|
20
20
|
return React.createElement("div", {
|
|
21
21
|
className: cn(className, styles.wrapper)
|
|
22
22
|
}, React.createElement("div", {
|
|
23
23
|
className: cn(styles.layout, 'ktl-layout ktl-layout--center')
|
|
24
24
|
}, topTitle && React.createElement("div", {
|
|
25
|
-
className: cn(classTopTitle, styles.topTitle, textCn('
|
|
25
|
+
className: cn(classTopTitle, styles.topTitle, textCn('rs-text-2', {
|
|
26
|
+
hardness: 'hard'
|
|
27
|
+
}))
|
|
26
28
|
}, topTitle), React.createElement("h2", {
|
|
27
|
-
className: cn(classMainTitle, styles.mainTitle, textCn('
|
|
29
|
+
className: cn(classMainTitle, styles.mainTitle, textCn('rs-h2'))
|
|
28
30
|
}, mainTitle), children && React.createElement("div", {
|
|
29
31
|
className: cn(classContent, styles.content)
|
|
30
32
|
}, children), buttons && React.createElement("div", {
|
|
@@ -32,4 +34,14 @@ function CtaBlock({
|
|
|
32
34
|
}, buttons)));
|
|
33
35
|
}
|
|
34
36
|
|
|
37
|
+
function CtaBlock({
|
|
38
|
+
theme,
|
|
39
|
+
...props
|
|
40
|
+
}) {
|
|
41
|
+
return React.createElement(ThemeProvider, {
|
|
42
|
+
theme: theme || 'dark'
|
|
43
|
+
}, React.createElement(Cta, { ...props
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
|
|
35
47
|
export { CtaBlock };
|
package/package.json
CHANGED