@jetbrains/kotlin-web-site-ui 4.7.2 → 4.8.0-alpha.0
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.
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
.ktl-nav-item-module_navItem_gRy22 {
|
|
2
|
+
padding: 0 12px;
|
|
3
|
+
height: 52px;
|
|
4
|
+
cursor: pointer;
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
position: relative;
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
border: 0;
|
|
10
|
+
background: none;
|
|
11
|
+
color: #ffffff;
|
|
12
|
+
}
|
|
13
|
+
.ktl-nav-item-module_navItem_gRy22:hover {
|
|
14
|
+
background: rgba(255, 255, 255, 0.10);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.ktl-nav-item-module_rightIcon_XlxMF {
|
|
18
|
+
flex-direction: row-reverse;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.ktl-nav-item-module_navItemActive_gI8Nv::after {
|
|
22
|
+
content: '';
|
|
23
|
+
width: 100%;
|
|
24
|
+
height: 2px;
|
|
25
|
+
background: #ffffff;
|
|
26
|
+
position: absolute;
|
|
27
|
+
bottom: 0;
|
|
28
|
+
left: 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.ktl-nav-item-module_title_9VXwr {
|
|
32
|
+
display: block;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ktl-nav-item-module_titleWithIcon_CVqpS {
|
|
36
|
+
margin-left: 8px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.ktl-nav-item-module_titleWithIconRight_FwEnm {
|
|
40
|
+
margin-left: 0;
|
|
41
|
+
margin-right: 8px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.ktl-nav-item-module_titleWithoutIcon_XgnMl {
|
|
45
|
+
margin: 0;
|
|
46
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import cn from 'classnames';
|
|
4
|
+
import styles from './nav-item.module.pcss.js';
|
|
5
|
+
import { useTextStyles } from '@rescui/typography';
|
|
6
|
+
|
|
7
|
+
const NavItem = ({
|
|
8
|
+
children,
|
|
9
|
+
icon,
|
|
10
|
+
active,
|
|
11
|
+
iconPosition,
|
|
12
|
+
onClick
|
|
13
|
+
}) => {
|
|
14
|
+
const textCn = useTextStyles();
|
|
15
|
+
const navItemClass = cn(styles.navItem, {
|
|
16
|
+
[styles.navItemActive]: active,
|
|
17
|
+
[styles.rightIcon]: iconPosition === 'right'
|
|
18
|
+
});
|
|
19
|
+
const textStyles = cn(styles.title, {
|
|
20
|
+
[styles.titleWithIcon]: icon,
|
|
21
|
+
[styles.titleWithIconRight]: iconPosition === 'right',
|
|
22
|
+
[styles.titleWithoutIcon]: !children
|
|
23
|
+
});
|
|
24
|
+
return React.createElement("div", {
|
|
25
|
+
className: navItemClass,
|
|
26
|
+
onClick: onClick
|
|
27
|
+
}, icon ? icon : null, React.createElement("div", {
|
|
28
|
+
className: cn(textCn('rs-text-2', {
|
|
29
|
+
hardness: 'hard'
|
|
30
|
+
}), textStyles)
|
|
31
|
+
}, children));
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { NavItem, NavItem as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var styles = {
|
|
2
|
+
"navItem": "ktl-nav-item-module_navItem_gRy22",
|
|
3
|
+
"rightIcon": "ktl-nav-item-module_rightIcon_XlxMF",
|
|
4
|
+
"navItemActive": "ktl-nav-item-module_navItemActive_gI8Nv",
|
|
5
|
+
"title": "ktl-nav-item-module_title_9VXwr",
|
|
6
|
+
"titleWithIcon": "ktl-nav-item-module_titleWithIcon_CVqpS",
|
|
7
|
+
"titleWithIconRight": "ktl-nav-item-module_titleWithIconRight_FwEnm",
|
|
8
|
+
"titleWithoutIcon": "ktl-nav-item-module_titleWithoutIcon_XgnMl"
|
|
9
|
+
};
|
|
10
|
+
export { styles as default };
|