@grassus/ui-package 1.0.25 → 1.0.27
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/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Header/Header.d.ts +3 -4
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Header/Header.d.ts +3 -4
- package/dist/index.d.ts +3 -4
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("react"),t=require("antd");const{
|
|
1
|
+
"use strict";var e=require("react"),t=require("antd");const{Text:n}=t.Typography,{Sider:l}=t.Layout,a={height:"100vh",position:"sticky",top:0,overflow:"hidden"},r=e=>({scrollbarGutter:"stable",overflow:e?"auto":"hidden"}),o="menuCollapsed";!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&l.firstChild?l.insertBefore(a,l.firstChild):l.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("button {\r\n /* font-size: 60px; */\r\n}\r\n");exports.Header=({title:l="",metaTitle:a,extra:r,actions:o,gap:s,styles:i})=>(a&&console.log("set",a),e.createElement(t.Layout.Header,{style:(null==i?void 0:i.body)||{}},e.createElement(t.Flex,{align:"center",gap:s,style:{width:"100%"}},r&&e.createElement("div",{style:(null==i?void 0:i.extra)||{}},r),e.createElement(t.Flex,{flex:"1 1 auto",style:Object.assign({overflow:"hidden"},null==i?void 0:i.title)},e.createElement(n,{ellipsis:!0},l)),o&&e.createElement("div",{style:(null==i?void 0:i.actions)||{}},o)))),exports.SiderMenu=({collapsed:n,title:o,extra:s,styles:i,loading:c,menuProps:d})=>{const[u,p]=e.useState(!1);let m;return"boolean"==typeof c?m={spinning:c}:"object"==typeof c&&(m=Object.assign({spinning:!0},c)),e.createElement(l,{collapsed:n,style:(null==i?void 0:i.body)||{}},e.createElement(t.Flex,{vertical:!0,style:a},o&&e.createElement(t.Flex,{align:"center",justify:"center",style:(null==i?void 0:i.header)||{}},e.createElement("div",{style:{width:"100%"}},o)),e.createElement(t.Flex,{vertical:!0,flex:"1 1 auto",style:r(u),onMouseEnter:()=>{p(!0)},onMouseLeave:()=>{p(!1)}},e.createElement(t.Spin,Object.assign({spinning:!1},m),e.createElement(t.Menu,Object.assign({},d,{style:(null==i?void 0:i.actions)||{}})))),s&&e.createElement(t.Flex,{style:(null==i?void 0:i.extra)||{}},s)))},exports.StepPreloader=({colorPrimary:t="#1677ff",colorSecondary:n="transparent",count:l=8,delay:a=1.2})=>{const r=e=>({animationDelay:`${.1*e}s`}),o={width:"10px",height:"70px",display:"inline-block",transformOrigin:"bottom center",borderTopRightRadius:"20px",borderTopLeftRadius:"20px",animation:`animationStepPreloader ${a}s linear infinite`,margin:"2px"};return e.createElement("span",null,e.createElement("style",null,`\n @keyframes animationStepPreloader {\n 0% {\n transform: scaleY(0.1);\n background: ${n};\n }\n 50% {\n transform: scaleY(1);\n background: ${t};\n }\n 100% {\n transform: scaleY(0.1);\n background: ${n};\n }\n }\n `),Array.from(Array(l).keys()).map((t=>e.createElement("div",{key:t,style:Object.assign(Object.assign({},o),r(t))}))))},exports.TestInfo=t=>e.createElement("button",null,t.label),exports.useMenuCollapsed=t=>{const[n,l]=e.useState((e=>{const t=window.localStorage.getItem(e);return!!t&&/true/i.test(t)})(t||o));return{menuCollapsed:n,setMenuCollapsed:e=>{l(e),window.localStorage.setItem(t||o,String(e))}}};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/components/Header/Header.tsx","../../src/components/SiderMenu/SiderMenu.tsx","../../src/components/SiderMenu/hooks/useMenuCollapsed.ts","../../node_modules/style-inject/dist/style-inject.es.js","../../src/components/preloaders/StepPreloader/StepPreloader.tsx","../../src/components/TestInfo/TestInfo.tsx"],"sourcesContent":[null,null,null,"function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null],"names":["
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/components/Header/Header.tsx","../../src/components/SiderMenu/SiderMenu.tsx","../../src/components/SiderMenu/hooks/useMenuCollapsed.ts","../../node_modules/style-inject/dist/style-inject.es.js","../../src/components/preloaders/StepPreloader/StepPreloader.tsx","../../src/components/TestInfo/TestInfo.tsx"],"sourcesContent":[null,null,null,"function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null],"names":["Text","Typography","Sider","Layout","siderWrapper","height","position","top","overflow","menuWrapper","isHover","scrollbarGutter","defaultMenuName","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","title","metaTitle","extra","actions","gap","styles","console","log","React","Header","body","Flex","align","width","flex","Object","assign","ellipsis","collapsed","loading","menuProps","setIsHover","useState","spinProps","spinning","vertical","justify","header","onMouseEnter","onMouseLeave","Spin","Menu","colorPrimary","colorSecondary","count","delay","barItem","item","animationDelay","barStyle1","display","transformOrigin","borderTopRightRadius","borderTopLeftRadius","animation","margin","Array","from","keys","map","key","props","label","menuName","menuCollapsed","setMenuCollapsed","sidebarState","window","localStorage","getItem","test","getInitialMenuCollapsedState","value","setItem","String"],"mappings":"sDAIA,MAAMA,KAAEA,GAASC,cCCXC,MAAEA,GAAUC,SAkBZC,EAAoC,CACxCC,OAAQ,QACRC,SAAU,SACVC,IAAK,EACLC,SAAU,UAGNC,EAAeC,IACZ,CACLC,gBAAiB,SACjBH,SAAUE,EAAU,OAAS,WC/B3BE,EAAkB,iBCFxB,SAAqBC,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBY,CAqB1D,kEHJe,EAAGe,QAAQ,GAAIC,YAAWC,QAAOC,UAASC,MAAKC,aAExDJ,GAAWK,QAAQC,IAAI,MAAON,GAGhCO,EAAChB,cAAAjB,EAAAA,OAAOkC,QAAOlB,OAAOc,aAAM,EAANA,EAAQK,OAAQ,IACpCF,EAAAhB,cAACmB,OAAK,CAAAC,MAAM,SAASR,IAAKA,EAAKb,MAAO,CAAEsB,MAAO,SAC5CX,GAASM,EAAKhB,cAAA,MAAA,CAAAD,OAAOc,aAAA,EAAAA,EAAQH,QAAS,CAAA,GAAKA,GAE5CM,EAAAhB,cAAC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5F,MAAMC,EAAWC,IAER,CAAEC,eAAgB,GADR,GAAMD,OAInBE,EAAiC,CACrC1B,MAAO,OACPpC,OAAQ,OACR+D,QAAS,eACTC,gBAAiB,gBACjBC,qBAAsB,OACtBC,oBAAqB,OACrBC,UAAW,0BAA0BT,qBACrCU,OAAQ,OAGV,OACErC,EAAAhB,cAAA,OAAA,KACEgB,EACGhB,cAAA,QAAA,KAAA,uIAImByC,wGAIAD,2GAIAC,4CAKrBa,MAAMC,KAAKD,MAAMZ,GAAOc,QAAQC,KAAKZ,GACpC7B,EAAAhB,cAAA,MAAA,CAAK0D,IAAKb,EAAM9C,qCAAYgD,GAAcH,EAAQC,QAGtD,mBC5Ccc,GACT3C,EAAShB,cAAA,SAAA,KAAA2D,EAAMC,gCHOSC,IAC/B,MAAOC,EAAeC,GAAoBjC,EAAAA,SAXP,CAAC+B,IACpC,MAAMG,EAAeC,OAAOC,aAAaC,QAAQN,GAEjD,QAAKG,GAIE,QAAQI,KAAKJ,EAAa,EAK/BK,CAA6BR,GAAYrE,IAG3C,MAAO,CACLsE,gBACAC,iBAAmBO,IACjBP,EAAiBO,GACjBL,OAAOC,aAAaK,QAAQV,GAAYrE,EAAiBgF,OAAOF,GAAO,EAE1E","x_google_ignoreList":[3]}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SizeType } from 'antd/es/config-provider/SizeContext';
|
|
3
|
-
declare const TITLE_ELE_LIST: readonly [1, 2, 3, 4, 5];
|
|
4
3
|
interface IWrapperHeader {
|
|
5
4
|
actions?: React.ReactNode | undefined;
|
|
6
5
|
extra?: React.ReactNode | undefined;
|
|
7
|
-
title?: string | undefined;
|
|
8
|
-
|
|
6
|
+
title?: React.ReactNode | string | undefined;
|
|
7
|
+
metaTitle?: string | undefined;
|
|
9
8
|
gap?: React.CSSProperties['gap'] | SizeType;
|
|
10
9
|
styles?: {
|
|
11
10
|
actions?: React.CSSProperties;
|
|
@@ -14,5 +13,5 @@ interface IWrapperHeader {
|
|
|
14
13
|
title?: React.CSSProperties;
|
|
15
14
|
};
|
|
16
15
|
}
|
|
17
|
-
declare const Header: ({ title,
|
|
16
|
+
declare const Header: ({ title, metaTitle, extra, actions, gap, styles }: IWrapperHeader) => React.JSX.Element;
|
|
18
17
|
export default Header;
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e,{useState as t}from"react";import{Layout as n,Flex as l,Typography as a,Spin as r,Menu as o}from"antd";const{
|
|
1
|
+
import e,{useState as t}from"react";import{Layout as n,Flex as l,Typography as a,Spin as r,Menu as o}from"antd";const{Text:i}=a,s=({title:t="",metaTitle:a,extra:r,actions:o,gap:s,styles:c})=>(a&&console.log("set",a),e.createElement(n.Header,{style:(null==c?void 0:c.body)||{}},e.createElement(l,{align:"center",gap:s,style:{width:"100%"}},r&&e.createElement("div",{style:(null==c?void 0:c.extra)||{}},r),e.createElement(l,{flex:"1 1 auto",style:Object.assign({overflow:"hidden"},null==c?void 0:c.title)},e.createElement(i,{ellipsis:!0},t)),o&&e.createElement("div",{style:(null==c?void 0:c.actions)||{}},o)))),{Sider:c}=n,d={height:"100vh",position:"sticky",top:0,overflow:"hidden"},m=e=>({scrollbarGutter:"stable",overflow:e?"auto":"hidden"}),u=({collapsed:n,title:a,extra:i,styles:s,loading:u,menuProps:p})=>{const[y,g]=t(!1);let f;return"boolean"==typeof u?f={spinning:u}:"object"==typeof u&&(f=Object.assign({spinning:!0},u)),e.createElement(c,{collapsed:n,style:(null==s?void 0:s.body)||{}},e.createElement(l,{vertical:!0,style:d},a&&e.createElement(l,{align:"center",justify:"center",style:(null==s?void 0:s.header)||{}},e.createElement("div",{style:{width:"100%"}},a)),e.createElement(l,{vertical:!0,flex:"1 1 auto",style:m(y),onMouseEnter:()=>{g(!0)},onMouseLeave:()=>{g(!1)}},e.createElement(r,Object.assign({spinning:!1},f),e.createElement(o,Object.assign({},p,{style:(null==s?void 0:s.actions)||{}})))),i&&e.createElement(l,{style:(null==s?void 0:s.extra)||{}},i)))},p="menuCollapsed",y=e=>{const[n,l]=t((e=>{const t=window.localStorage.getItem(e);return!!t&&/true/i.test(t)})(e||p));return{menuCollapsed:n,setMenuCollapsed:t=>{l(t),window.localStorage.setItem(e||p,String(t))}}};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&l.firstChild?l.insertBefore(a,l.firstChild):l.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("button {\r\n /* font-size: 60px; */\r\n}\r\n");const g=t=>e.createElement("button",null,t.label),f=({colorPrimary:t="#1677ff",colorSecondary:n="transparent",count:l=8,delay:a=1.2})=>{const r=e=>({animationDelay:`${.1*e}s`}),o={width:"10px",height:"70px",display:"inline-block",transformOrigin:"bottom center",borderTopRightRadius:"20px",borderTopLeftRadius:"20px",animation:`animationStepPreloader ${a}s linear infinite`,margin:"2px"};return e.createElement("span",null,e.createElement("style",null,`\n @keyframes animationStepPreloader {\n 0% {\n transform: scaleY(0.1);\n background: ${n};\n }\n 50% {\n transform: scaleY(1);\n background: ${t};\n }\n 100% {\n transform: scaleY(0.1);\n background: ${n};\n }\n }\n `),Array.from(Array(l).keys()).map((t=>e.createElement("div",{key:t,style:Object.assign(Object.assign({},o),r(t))}))))};export{s as Header,u as SiderMenu,f as StepPreloader,g as TestInfo,y as useMenuCollapsed};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/components/Header/Header.tsx","../../src/components/SiderMenu/SiderMenu.tsx","../../src/components/SiderMenu/hooks/useMenuCollapsed.ts","../../node_modules/style-inject/dist/style-inject.es.js","../../src/components/TestInfo/TestInfo.tsx","../../src/components/preloaders/StepPreloader/StepPreloader.tsx"],"sourcesContent":[null,null,null,"function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null],"names":["
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/components/Header/Header.tsx","../../src/components/SiderMenu/SiderMenu.tsx","../../src/components/SiderMenu/hooks/useMenuCollapsed.ts","../../node_modules/style-inject/dist/style-inject.es.js","../../src/components/TestInfo/TestInfo.tsx","../../src/components/preloaders/StepPreloader/StepPreloader.tsx"],"sourcesContent":[null,null,null,"function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null],"names":["Text","Typography","Header","title","metaTitle","extra","actions","gap","styles","console","log","React","createElement","Layout","style","body","Flex","align","width","flex","Object","assign","overflow","ellipsis","Sider","siderWrapper","height","position","top","menuWrapper","isHover","scrollbarGutter","SiderMenu","collapsed","loading","menuProps","setIsHover","useState","spinProps","spinning","vertical","justify","header","onMouseEnter","onMouseLeave","Spin","Menu","defaultMenuName","useMenuCollapsed","menuName","menuCollapsed","setMenuCollapsed","sidebarState","window","localStorage","getItem","test","getInitialMenuCollapsedState","value","setItem","String","css","ref","insertAt","document","head","getElementsByTagName","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","TestInfo","props","label","StepPreloader","colorPrimary","colorSecondary","count","delay","barItem","item","animationDelay","barStyle1","display","transformOrigin","borderTopRightRadius","borderTopLeftRadius","animation","margin","Array","from","keys","map","key"],"mappings":"gHAIA,MAAMA,KAAEA,GAASC,EAiBXC,EAAS,EAAGC,QAAQ,GAAIC,YAAWC,QAAOC,UAASC,MAAKC,aAExDJ,GAAWK,QAAQC,IAAI,MAAON,GAGhCO,EAACC,cAAAC,EAAOX,QAAOY,OAAON,aAAM,EAANA,EAAQO,OAAQ,IACpCJ,EAAAC,cAACI,EAAK,CAAAC,MAAM,SAASV,IAAKA,EAAKO,MAAO,CAAEI,MAAO,SAC5Cb,GAASM,EAAKC,cAAA,MAAA,CAAAE,OAAON,aAAA,EAAAA,EAAQH,QAAS,CAAA,GAAKA,GAE5CM,EAAAC,cAACI,EAAK,CAAAG,KAAK,WAAWL,MAASM,OAAAC,OAAA,CAAAC,SAAU,UAAad,aAAA,EAAAA,EAAQL,QAC5DQ,EAAAC,cAACZ,EAAK,CAAAuB,UAAU,GAAApB,IAGjBG,GAAWK,uBAAKG,OAAON,aAAA,EAAAA,EAAQF,UAAW,CAAA,GAAKA,OC7BlDkB,MAAEA,GAAUX,EAkBZY,EAAoC,CACxCC,OAAQ,QACRC,SAAU,SACVC,IAAK,EACLN,SAAU,UAGNO,EAAeC,IACZ,CACLC,gBAAiB,SACjBT,SAAUQ,EAAU,OAAS,WAI3BE,EAAY,EAAGC,YAAW9B,QAAOE,QAAOG,SAAQ0B,UAASC,gBAC7D,MAAOL,EAASM,GAAcC,GAAS,GAUvC,IAAIC,EAYJ,MAXuB,kBAAZJ,EACTI,EAAY,CACVC,SAAUL,GAEgB,iBAAZA,IAChBI,iBACEC,UAAU,GACPL,IAKLvB,EAACC,cAAAY,GAAMS,UAAWA,EAAWnB,OAAON,aAAM,EAANA,EAAQO,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A,EAAMyD,WACRzD,EAAMyD,WAAWC,QAAUX,EAE3B/C,EAAMwD,YAAYN,SAASS,eAAeZ,GAnBY,CAqB1D,mDCnBA,MAAMa,EAAYC,GACThE,EAASC,cAAA,SAAA,KAAA+D,EAAMC,OCElBC,EAAgB,EAAGC,eAAa,UAAWC,iBAAe,cAAeC,QAAM,EAAGC,QAAM,QAC5F,MAAMC,EAAWC,IAER,CAAEC,eAAgB,GADR,GAAMD,OAInBE,EAAiC,CACrCnE,MAAO,OACPQ,OAAQ,OACR4D,QAAS,eACTC,gBAAiB,gBACjBC,qBAAsB,OACtBC,oBAAqB,OACrBC,UAAW,0BAA0BT,qBACrCU,OAAQ,OAGV,OACEhF,EAAAC,cAAA,OAAA,KACED,EACGC,cAAA,QAAA,KAAA,uIAImBmE,wGAIAD,2GAIAC,4CAKrBa,MAAMC,KAAKD,MAAMZ,GAAOc,QAAQC,KAAKZ,GACpCxE,EAAAC,cAAA,MAAA,CAAKoF,IAAKb,EAAMrE,qCAAYuE,GAAcH,EAAQC,QAGtD","x_google_ignoreList":[3]}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SizeType } from 'antd/es/config-provider/SizeContext';
|
|
3
|
-
declare const TITLE_ELE_LIST: readonly [1, 2, 3, 4, 5];
|
|
4
3
|
interface IWrapperHeader {
|
|
5
4
|
actions?: React.ReactNode | undefined;
|
|
6
5
|
extra?: React.ReactNode | undefined;
|
|
7
|
-
title?: string | undefined;
|
|
8
|
-
|
|
6
|
+
title?: React.ReactNode | string | undefined;
|
|
7
|
+
metaTitle?: string | undefined;
|
|
9
8
|
gap?: React.CSSProperties['gap'] | SizeType;
|
|
10
9
|
styles?: {
|
|
11
10
|
actions?: React.CSSProperties;
|
|
@@ -14,5 +13,5 @@ interface IWrapperHeader {
|
|
|
14
13
|
title?: React.CSSProperties;
|
|
15
14
|
};
|
|
16
15
|
}
|
|
17
|
-
declare const Header: ({ title,
|
|
16
|
+
declare const Header: ({ title, metaTitle, extra, actions, gap, styles }: IWrapperHeader) => React.JSX.Element;
|
|
18
17
|
export default Header;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,12 +3,11 @@ import { SizeType } from 'antd/es/config-provider/SizeContext';
|
|
|
3
3
|
import { MenuProps } from 'antd/lib/menu/menu';
|
|
4
4
|
import { SpinProps } from 'antd/lib/spin';
|
|
5
5
|
|
|
6
|
-
declare const TITLE_ELE_LIST: readonly [1, 2, 3, 4, 5];
|
|
7
6
|
interface IWrapperHeader {
|
|
8
7
|
actions?: React.ReactNode | undefined;
|
|
9
8
|
extra?: React.ReactNode | undefined;
|
|
10
|
-
title?: string | undefined;
|
|
11
|
-
|
|
9
|
+
title?: React.ReactNode | string | undefined;
|
|
10
|
+
metaTitle?: string | undefined;
|
|
12
11
|
gap?: React.CSSProperties['gap'] | SizeType;
|
|
13
12
|
styles?: {
|
|
14
13
|
actions?: React.CSSProperties;
|
|
@@ -17,7 +16,7 @@ interface IWrapperHeader {
|
|
|
17
16
|
title?: React.CSSProperties;
|
|
18
17
|
};
|
|
19
18
|
}
|
|
20
|
-
declare const Header: ({ title,
|
|
19
|
+
declare const Header: ({ title, metaTitle, extra, actions, gap, styles }: IWrapperHeader) => React.JSX.Element;
|
|
21
20
|
|
|
22
21
|
interface ISideMenu {
|
|
23
22
|
menuProps: MenuProps;
|