@bigbinary/neeto-molecules 3.3.18 → 3.3.19
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,25 @@
|
|
|
1
|
+
import classnames from 'classnames';
|
|
2
|
+
import Typography from '@bigbinary/neetoui/Typography';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var MobilePreviewHeader = function MobilePreviewHeader(_ref) {
|
|
7
|
+
var _ref$className = _ref.className,
|
|
8
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
9
|
+
_ref$message = _ref.message,
|
|
10
|
+
message = _ref$message === void 0 ? "" : _ref$message;
|
|
11
|
+
var _useTranslation = useTranslation(),
|
|
12
|
+
t = _useTranslation.t;
|
|
13
|
+
return /*#__PURE__*/jsx("div", {
|
|
14
|
+
className: classnames(["neeto-ui-bg-gray-200 px-6 py-5", className]),
|
|
15
|
+
"data-cy": "mobile-preview-header",
|
|
16
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
17
|
+
lineHeight: "normal",
|
|
18
|
+
style: "body2",
|
|
19
|
+
children: message || t("neetoMolecules.mobilePreview.message")
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { MobilePreviewHeader as default };
|
|
25
|
+
//# sourceMappingURL=MobilePreviewHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MobilePreviewHeader.js","sources":["../src/components/MobilePreviewHeader/index.jsx"],"sourcesContent":["import classnames from \"classnames\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\n// Had to disable this to populate content in description column.\n// eslint-disable-next-line @bigbinary/neeto/no-dumb-components-with-use-translation\nconst MobilePreviewHeader = ({ className = \"\", message = \"\" }) => {\n const { t } = useTranslation();\n\n return (\n <div\n className={classnames([\"neeto-ui-bg-gray-200 px-6 py-5\", className])}\n data-cy=\"mobile-preview-header\"\n >\n <Typography lineHeight=\"normal\" style=\"body2\">\n {message || t(\"neetoMolecules.mobilePreview.message\")}\n </Typography>\n </div>\n );\n};\n\nMobilePreviewHeader.propTypes = {\n /**\n * To provide additional classes\n */\n className: PropTypes.string,\n /**\n * To provide custom message.\n */\n message: PropTypes.node,\n};\n\nexport default MobilePreviewHeader;\n"],"names":["MobilePreviewHeader","_ref","_ref$className","className","_ref$message","message","_useTranslation","useTranslation","t","_jsx","classnames","children","Typography","lineHeight","style"],"mappings":";;;;;AAOA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAAC,IAAA,EAAyC;AAAA,EAAA,IAAAC,cAAA,GAAAD,IAAA,CAAnCE,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,cAAA;IAAAE,YAAA,GAAAH,IAAA,CAAEI,OAAO;AAAPA,IAAAA,OAAO,GAAAD,YAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,YAAA,CAAA;AACzD,EAAA,IAAAE,eAAA,GAAcC,cAAc,EAAE;IAAtBC,CAAC,GAAAF,eAAA,CAADE,CAAC,CAAA;AAET,EAAA,oBACEC,GAAA,CAAA,KAAA,EAAA;IACEN,SAAS,EAAEO,UAAU,CAAC,CAAC,gCAAgC,EAAEP,SAAS,CAAC,CAAE;AACrE,IAAA,SAAA,EAAQ,uBAAuB;IAAAQ,QAAA,eAE/BF,GAAA,CAACG,UAAU,EAAA;AAACC,MAAAA,UAAU,EAAC,QAAQ;AAACC,MAAAA,KAAK,EAAC,OAAO;AAAAH,MAAAA,QAAA,EAC1CN,OAAO,IAAIG,CAAC,CAAC,sCAAsC,CAAA;KAC1C,CAAA;AAAC,GACV,CAAC,CAAA;AAEV;;;;"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var classnames = require('classnames');
|
|
4
|
+
var Typography = require('@bigbinary/neetoui/Typography');
|
|
5
|
+
var reactI18next = require('react-i18next');
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
|
|
8
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
|
+
|
|
10
|
+
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
11
|
+
var Typography__default = /*#__PURE__*/_interopDefaultLegacy(Typography);
|
|
12
|
+
|
|
13
|
+
var MobilePreviewHeader = function MobilePreviewHeader(_ref) {
|
|
14
|
+
var _ref$className = _ref.className,
|
|
15
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
16
|
+
_ref$message = _ref.message,
|
|
17
|
+
message = _ref$message === void 0 ? "" : _ref$message;
|
|
18
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
19
|
+
t = _useTranslation.t;
|
|
20
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
21
|
+
className: classnames__default["default"](["neeto-ui-bg-gray-200 px-6 py-5", className]),
|
|
22
|
+
"data-cy": "mobile-preview-header",
|
|
23
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
24
|
+
lineHeight: "normal",
|
|
25
|
+
style: "body2",
|
|
26
|
+
children: message || t("neetoMolecules.mobilePreview.message")
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
module.exports = MobilePreviewHeader;
|
|
32
|
+
//# sourceMappingURL=MobilePreviewHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MobilePreviewHeader.js","sources":["../../src/components/MobilePreviewHeader/index.jsx"],"sourcesContent":["import classnames from \"classnames\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\n// Had to disable this to populate content in description column.\n// eslint-disable-next-line @bigbinary/neeto/no-dumb-components-with-use-translation\nconst MobilePreviewHeader = ({ className = \"\", message = \"\" }) => {\n const { t } = useTranslation();\n\n return (\n <div\n className={classnames([\"neeto-ui-bg-gray-200 px-6 py-5\", className])}\n data-cy=\"mobile-preview-header\"\n >\n <Typography lineHeight=\"normal\" style=\"body2\">\n {message || t(\"neetoMolecules.mobilePreview.message\")}\n </Typography>\n </div>\n );\n};\n\nMobilePreviewHeader.propTypes = {\n /**\n * To provide additional classes\n */\n className: PropTypes.string,\n /**\n * To provide custom message.\n */\n message: PropTypes.node,\n};\n\nexport default MobilePreviewHeader;\n"],"names":["MobilePreviewHeader","_ref","_ref$className","className","_ref$message","message","_useTranslation","useTranslation","t","_jsx","classnames","children","Typography","lineHeight","style"],"mappings":";;;;;;;;;;;;AAOA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAAC,IAAA,EAAyC;AAAA,EAAA,IAAAC,cAAA,GAAAD,IAAA,CAAnCE,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,cAAA;IAAAE,YAAA,GAAAH,IAAA,CAAEI,OAAO;AAAPA,IAAAA,OAAO,GAAAD,YAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,YAAA,CAAA;AACzD,EAAA,IAAAE,eAAA,GAAcC,2BAAc,EAAE;IAAtBC,CAAC,GAAAF,eAAA,CAADE,CAAC,CAAA;AAET,EAAA,oBACEC,cAAA,CAAA,KAAA,EAAA;IACEN,SAAS,EAAEO,8BAAU,CAAC,CAAC,gCAAgC,EAAEP,SAAS,CAAC,CAAE;AACrE,IAAA,SAAA,EAAQ,uBAAuB;IAAAQ,QAAA,eAE/BF,cAAA,CAACG,8BAAU,EAAA;AAACC,MAAAA,UAAU,EAAC,QAAQ;AAACC,MAAAA,KAAK,EAAC,OAAO;AAAAH,MAAAA,QAAA,EAC1CN,OAAO,IAAIG,CAAC,CAAC,sCAAsC,CAAA;KAC1C,CAAA;AAAC,GACV,CAAC,CAAA;AAEV;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-molecules",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.19",
|
|
4
4
|
"description": "A package of reusable molecular components for neeto products.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-molecules.git",
|
|
6
6
|
"author": "Amaljith K <amaljith.k@bigbinary.com>",
|
package/src/translations/en.json
CHANGED
|
@@ -738,6 +738,9 @@
|
|
|
738
738
|
},
|
|
739
739
|
"deviceIncompatibility": {
|
|
740
740
|
"description": "The design tab is currently not supported in this screen size. Please switch to a screen larger than 768px wide."
|
|
741
|
+
},
|
|
742
|
+
"mobilePreview": {
|
|
743
|
+
"message": "The following section is a preview based on the changes you have made above."
|
|
741
744
|
}
|
|
742
745
|
}
|
|
743
746
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Can be used to show preview message for smaller viewports.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
*
|
|
8
|
+
* import MobilePreviewHeader from "@bigbinary/neeto-molecules/MobilePreviewHeader";
|
|
9
|
+
*
|
|
10
|
+
* const App = () => <MobilePreviewHeader />;
|
|
11
|
+
* @endexample
|
|
12
|
+
*/
|
|
13
|
+
const MobilePreviewHeader: React.FC<{
|
|
14
|
+
message?: React.ReactNode;
|
|
15
|
+
className?: string;
|
|
16
|
+
}>;
|
|
17
|
+
export default MobilePreviewHeader;
|