myshell-react-lib 0.1.36 → 0.1.37
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.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -978,13 +978,18 @@ type ITopNavigationBar = {
|
|
|
978
978
|
* @default 2
|
|
979
979
|
*/
|
|
980
980
|
pageType?: 1 | 2;
|
|
981
|
+
/**
|
|
982
|
+
* 自定义样式
|
|
983
|
+
* string
|
|
984
|
+
*/
|
|
985
|
+
className?: string;
|
|
981
986
|
/**
|
|
982
987
|
* 返回按钮点击回调
|
|
983
988
|
* () => void
|
|
984
989
|
*/
|
|
985
990
|
onBack?: () => void;
|
|
986
991
|
};
|
|
987
|
-
declare function TopNavigationBar({ searchElement, title, border, backUrl, children, hasBackground, avatar, onBack, pageType, }: ITopNavigationBar): react_jsx_runtime.JSX.Element;
|
|
992
|
+
declare function TopNavigationBar({ searchElement, title, border, backUrl, children, hasBackground, avatar, onBack, pageType, className, }: ITopNavigationBar): react_jsx_runtime.JSX.Element;
|
|
988
993
|
|
|
989
994
|
interface ISelectProps extends SelectPrimitive.SelectProps {
|
|
990
995
|
options?: Array<{
|
package/dist/index.d.ts
CHANGED
|
@@ -978,13 +978,18 @@ type ITopNavigationBar = {
|
|
|
978
978
|
* @default 2
|
|
979
979
|
*/
|
|
980
980
|
pageType?: 1 | 2;
|
|
981
|
+
/**
|
|
982
|
+
* 自定义样式
|
|
983
|
+
* string
|
|
984
|
+
*/
|
|
985
|
+
className?: string;
|
|
981
986
|
/**
|
|
982
987
|
* 返回按钮点击回调
|
|
983
988
|
* () => void
|
|
984
989
|
*/
|
|
985
990
|
onBack?: () => void;
|
|
986
991
|
};
|
|
987
|
-
declare function TopNavigationBar({ searchElement, title, border, backUrl, children, hasBackground, avatar, onBack, pageType, }: ITopNavigationBar): react_jsx_runtime.JSX.Element;
|
|
992
|
+
declare function TopNavigationBar({ searchElement, title, border, backUrl, children, hasBackground, avatar, onBack, pageType, className, }: ITopNavigationBar): react_jsx_runtime.JSX.Element;
|
|
988
993
|
|
|
989
994
|
interface ISelectProps extends SelectPrimitive.SelectProps {
|
|
990
995
|
options?: Array<{
|
package/dist/index.js
CHANGED
|
@@ -10737,7 +10737,7 @@ import { useEffect as useEffect10, useRef as useRef6, useState as useState8 } fr
|
|
|
10737
10737
|
import { useMedia as useMedia5 } from "react-use";
|
|
10738
10738
|
import { jsx as jsx43, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
10739
10739
|
function TopNavigationBar(param) {
|
|
10740
|
-
var searchElement = param.searchElement, title = param.title, border = param.border, backUrl = param.backUrl, children = param.children, _param_hasBackground = param.hasBackground, hasBackground = _param_hasBackground === void 0 ?
|
|
10740
|
+
var searchElement = param.searchElement, title = param.title, border = param.border, backUrl = param.backUrl, children = param.children, _param_hasBackground = param.hasBackground, hasBackground = _param_hasBackground === void 0 ? false : _param_hasBackground, avatar = param.avatar, onBack = param.onBack, _param_pageType = param.pageType, pageType = _param_pageType === void 0 ? 2 : _param_pageType, className = param.className;
|
|
10741
10741
|
var isMobile2 = useMedia5("(max-width: 768px)");
|
|
10742
10742
|
var navbarRef = useRef6(null);
|
|
10743
10743
|
var _useState8 = _sliced_to_array(useState8(hasBackground), 2), showBackground = _useState8[0], setShowBackground = _useState8[1];
|
|
@@ -10761,7 +10761,7 @@ function TopNavigationBar(param) {
|
|
|
10761
10761
|
]);
|
|
10762
10762
|
return /* @__PURE__ */ jsxs24("div", {
|
|
10763
10763
|
ref: navbarRef,
|
|
10764
|
-
className: cn("w-full flex flex-col md:flex-row justify-center items-center px-4 md:px-6", !isMobile2 && border && "border-b border-Colors-Border-Default", showBackground
|
|
10764
|
+
className: cn("w-full flex flex-col md:flex-row justify-center items-center px-4 md:px-6", !isMobile2 && border && "border-b border-Colors-Border-Default", showBackground ? "bg-Colors-Background-Normal-Primary-Default" : "bg-cc-Button-Plain-bg-default md:bg-Colors-Background-Normal-Primary-Default", className),
|
|
10765
10765
|
children: [
|
|
10766
10766
|
/* @__PURE__ */ jsxs24("div", {
|
|
10767
10767
|
className: "relative w-full flex justify-between items-center h-13 md:h-15 pt-5 pb-1.5 md:pt-2 md:pb-2",
|