pallote-react 0.15.6 → 0.15.7
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/index.js +12 -4
- package/dist/package.json +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -492,6 +492,7 @@ CardContent.propTypes = {
|
|
|
492
492
|
};
|
|
493
493
|
|
|
494
494
|
const CardHeader = ({
|
|
495
|
+
icon,
|
|
495
496
|
label,
|
|
496
497
|
title,
|
|
497
498
|
subtitle,
|
|
@@ -503,7 +504,9 @@ const CardHeader = ({
|
|
|
503
504
|
className: classnames(['card_header', className])
|
|
504
505
|
}, props), actions && /*#__PURE__*/React__default.createElement("div", {
|
|
505
506
|
className: "card_headerActions"
|
|
506
|
-
}, actions),
|
|
507
|
+
}, actions), icon ? /*#__PURE__*/React__default.cloneElement(icon, {
|
|
508
|
+
className: `${icon.props.className ?? ''} card_icon`
|
|
509
|
+
}) : null, label ? /*#__PURE__*/React__default.createElement(Text, {
|
|
507
510
|
className: classnames('card_label')
|
|
508
511
|
}, label) : null, /*#__PURE__*/React__default.createElement(Text, {
|
|
509
512
|
className: classnames('card_title')
|
|
@@ -512,6 +515,7 @@ const CardHeader = ({
|
|
|
512
515
|
}, subtitle) : null);
|
|
513
516
|
};
|
|
514
517
|
CardHeader.propTypes = {
|
|
518
|
+
icon: PropTypes.node,
|
|
515
519
|
label: PropTypes.string,
|
|
516
520
|
title: PropTypes.string.isRequired,
|
|
517
521
|
subtitle: PropTypes.string,
|
|
@@ -978,6 +982,7 @@ SectionHeader.propTypes = {
|
|
|
978
982
|
};
|
|
979
983
|
|
|
980
984
|
const Section = ({
|
|
985
|
+
component = 'div',
|
|
981
986
|
align = 'left',
|
|
982
987
|
color = 'default',
|
|
983
988
|
landing,
|
|
@@ -986,7 +991,8 @@ const Section = ({
|
|
|
986
991
|
children,
|
|
987
992
|
...props
|
|
988
993
|
}) => {
|
|
989
|
-
|
|
994
|
+
const Component = component || 'div';
|
|
995
|
+
return /*#__PURE__*/React__default.createElement(Component, _extends({
|
|
990
996
|
className: classnames(['section', {
|
|
991
997
|
[`section-${align}`]: align,
|
|
992
998
|
[`section-${color}`]: color,
|
|
@@ -1005,6 +1011,7 @@ const Section = ({
|
|
|
1005
1011
|
})));
|
|
1006
1012
|
};
|
|
1007
1013
|
Section.propTypes = {
|
|
1014
|
+
component: PropTypes.oneOf(['div', 'footer', 'header', 'section']),
|
|
1008
1015
|
align: PropTypes.oneOf(['left', 'center', 'right']),
|
|
1009
1016
|
color: PropTypes.oneOf(['default', 'paper', 'primary', 'primaryLight']),
|
|
1010
1017
|
landing: PropTypes.bool,
|
|
@@ -1025,7 +1032,8 @@ const NavBar = ({
|
|
|
1025
1032
|
setIsOpen(!isOpen);
|
|
1026
1033
|
document.body.classList.toggle('js-navbar', !isOpen);
|
|
1027
1034
|
};
|
|
1028
|
-
return /*#__PURE__*/React__default.createElement(
|
|
1035
|
+
return /*#__PURE__*/React__default.createElement(Section, _extends({
|
|
1036
|
+
component: "header",
|
|
1029
1037
|
className: classnames(['navbar', {
|
|
1030
1038
|
[`navbar-${align}`]: align,
|
|
1031
1039
|
'js-opened': isOpen
|
|
@@ -1047,7 +1055,7 @@ const NavBar = ({
|
|
|
1047
1055
|
})
|
|
1048
1056
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1049
1057
|
className: "nav_container"
|
|
1050
|
-
}, children)))
|
|
1058
|
+
}, children)));
|
|
1051
1059
|
};
|
|
1052
1060
|
NavBar.propTypes = {
|
|
1053
1061
|
logo: PropTypes.node,
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pallote-react",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"styles": "dist/index.css",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"classnames": "^2.5.1",
|
|
24
24
|
"react-syntax-highlighter": "^15.6.1",
|
|
25
25
|
"sass": "^1.71.1",
|
|
26
|
-
"pallote-css": "^0.9.
|
|
26
|
+
"pallote-css": "^0.9.8"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@chromatic-com/storybook": "^3.2.4",
|