@ecoding/components.layout
Advanced tools
| import React from "react"; | ||
| interface IProps { | ||
| title?: string; | ||
| sTitle?: string; | ||
| style?: React.CSSProperties; | ||
| theme?: "blue" | "green"; | ||
| children: React.ReactNode; | ||
| } | ||
| declare const Tip: React.FC<IProps>; | ||
| export default Tip; |
| import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; | ||
| import { Space, Divider, Typography } from "antd"; | ||
| const Tip = ({ theme, style, title, sTitle, children }) => { | ||
| const TitleWrap = { | ||
| position: "relative", | ||
| borderBottom: "1px dashed #f1f1f1", | ||
| paddingLeft: "10px", | ||
| lineHeight: "30px" | ||
| }; | ||
| const spanStyle = Object.assign({}, { | ||
| position: "absolute", | ||
| left: 0, | ||
| top: "50%", | ||
| transform: "translateY(-50%)", | ||
| width: "4px", | ||
| height: "12px", | ||
| backgroundColor: theme === "green" ? "#00c4c0" : "#1890ff" | ||
| }, style); | ||
| return (_jsxs("div", Object.assign({ style: { marginBottom: "16px" } }, { children: [title || sTitle ? (_jsxs("div", Object.assign({ style: TitleWrap }, { children: [_jsx("span", { style: spanStyle }), _jsxs(Space, Object.assign({ align: "center", split: title && sTitle ? _jsx(Divider, { type: "vertical" }) : null }, { children: [_jsx(Typography.Title, Object.assign({ level: 5, style: { marginBottom: 0 } }, { children: title })), _jsx(Typography.Text, Object.assign({ type: "secondary" }, { children: sTitle }))] }))] }))) : null, _jsx(Space, Object.assign({ size: 0, style: { marginTop: "10px" }, direction: "vertical" }, { children: children }))] }))); | ||
| }; | ||
| export default Tip; |
@@ -1,2 +0,2 @@ | ||
| import React from 'react'; | ||
| import React from "react"; | ||
| interface IProps { | ||
@@ -3,0 +3,0 @@ className?: string; |
| import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; | ||
| import React, { memo, useEffect, useRef, useState } from 'react'; | ||
| import { asyncGetTableY } from './helper'; | ||
| import React, { memo, useEffect, useRef, useState } from "react"; | ||
| import { asyncGetTableY } from "./helper"; | ||
| const FlexColumnPageHC = memo(({ style, className, header, table, ovx, ovy, children }) => { | ||
| const ref = useRef(); | ||
| const [ty, setTY] = useState('100%'); | ||
| const [ty, setTY] = useState("100%"); | ||
| const flexColumnStyle = { | ||
| display: 'flex', | ||
| height: '100%', | ||
| flexDirection: 'column' | ||
| display: "flex", | ||
| height: "100%", | ||
| flexDirection: "column" | ||
| }; | ||
| const flexColumnHeaderStyle = { | ||
| paddingBottom: '20px' | ||
| paddingBottom: "20px" | ||
| }; | ||
| const flexColumnContentStyle = { | ||
| flexGrow: 1, | ||
| overflow: 'hidden', | ||
| overflowX: ovx ? 'auto' : 'hidden', | ||
| overflowY: ovy ? 'auto' : 'hidden' | ||
| overflow: "hidden", | ||
| overflowX: ovx ? "auto" : "hidden", | ||
| overflowY: ovy ? "auto" : "hidden" | ||
| }; | ||
| useEffect(() => { | ||
| ref.current && asyncGetTableY(ref.current).then((yy) => { | ||
| setTY(yy); | ||
| }); | ||
| ref.current && | ||
| asyncGetTableY(ref.current).then((yy) => { | ||
| setTY(yy); | ||
| }); | ||
| }, [header]); | ||
| return (_jsxs("div", Object.assign({ style: style || flexColumnStyle, className: className }, { children: [_jsx("div", Object.assign({ style: header ? flexColumnHeaderStyle : {} }, { children: header })), _jsxs("div", Object.assign({ style: flexColumnContentStyle }, { children: [table ? (_jsx("div", Object.assign({ style: { height: '100%' }, ref: ref }, { children: React.cloneElement(table, { y: ty }) }))) | ||
| : null, children] }))] }))); | ||
| return (_jsxs("div", Object.assign({ style: style || flexColumnStyle, className: `m-scroll-theme ${className}` }, { children: [_jsx("div", Object.assign({ style: header ? flexColumnHeaderStyle : {} }, { children: header })), _jsxs("div", Object.assign({ style: flexColumnContentStyle }, { children: [table ? (_jsx("div", Object.assign({ style: { height: "100%" }, ref: ref }, { children: React.cloneElement(table, { y: ty }) }))) : null, children] }))] }))); | ||
| }); | ||
| export default FlexColumnPageHC; |
+2
-2
| { | ||
| "name": "@ecoding/components.layout", | ||
| "version": "0.0.1", | ||
| "version": "0.0.2", | ||
| "author": "cxc", | ||
@@ -26,3 +26,3 @@ "homepage": "", | ||
| }, | ||
| "gitHead": "623a77dd884ebb78e8ae9255b740f8c511239d9e" | ||
| "gitHead": "955b6ccb3307aa0bc08cd3edb1a570b334e961e7" | ||
| } |
Unpublished package
Supply chain riskPackage version was not found on the registry. It may exist on a different registry and need to be configured to pull from that registry.
Found 1 instance in 1 package
Unpublished package
Supply chain riskPackage version was not found on the registry. It may exist on a different registry and need to be configured to pull from that registry.
Found 1 instance in 1 package
8630
21.98%17
13.33%187
21.43%