@uiw/react-empty
Advanced tools
Comparing version 4.21.14 to 5.0.0-bate-0
import React from 'react'; | ||
import './style/index.less'; | ||
export * from './style'; | ||
export interface EmptyProps extends React.HTMLAttributes<HTMLDivElement> { | ||
@@ -13,1 +13,2 @@ prefixCls?: string; | ||
export default Empty; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -5,5 +5,8 @@ "use strict"; | ||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard")["default"]; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
var _exportNames = {}; | ||
exports["default"] = void 0; | ||
@@ -17,2 +20,16 @@ | ||
var _style = _interopRequireWildcard(require("./style")); | ||
Object.keys(_style).forEach(function (key) { | ||
if (key === "default" || key === "__esModule") return; | ||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; | ||
if (key in exports && exports[key] === _style[key]) return; | ||
Object.defineProperty(exports, key, { | ||
enumerable: true, | ||
get: function get() { | ||
return _style[key]; | ||
} | ||
}); | ||
}); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
@@ -35,6 +52,6 @@ | ||
var cls = [prefixCls, className].filter(Boolean).join(' ').trim(); | ||
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _objectSpread2["default"])((0, _objectSpread2["default"])({ | ||
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_style["default"], (0, _objectSpread2["default"])((0, _objectSpread2["default"])({ | ||
className: cls | ||
}, other), {}, { | ||
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", { | ||
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_style.EmptyStyleIcon, { | ||
className: "".concat(prefixCls, "-icon"), | ||
@@ -63,6 +80,6 @@ children: icon ? icon : /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", (0, _objectSpread2["default"])((0, _objectSpread2["default"])({ | ||
})) | ||
}), description && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", { | ||
}), description && /*#__PURE__*/(0, _jsxRuntime.jsx)(_style.EmptyStyleDescription, { | ||
className: "".concat(prefixCls, "-description"), | ||
children: description | ||
}), children && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", { | ||
}), children && /*#__PURE__*/(0, _jsxRuntime.jsx)(_style.EmptyStyleFooter, { | ||
className: "".concat(prefixCls, "-footer"), | ||
@@ -76,3 +93,2 @@ children: children | ||
exports["default"] = _default; | ||
module.exports = exports.default; | ||
//# sourceMappingURL=index.js.map |
import React from 'react'; | ||
import './style/index.less'; | ||
export * from './style'; | ||
export interface EmptyProps extends React.HTMLAttributes<HTMLDivElement> { | ||
@@ -13,1 +13,2 @@ prefixCls?: string; | ||
export default Empty; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -5,5 +5,6 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
import React from 'react'; | ||
import "./style/index.css"; | ||
import EmptyWrap, { EmptyStyleDescription, EmptyStyleFooter, EmptyStyleIcon } from './style'; | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
import { jsxs as _jsxs } from "react/jsx-runtime"; | ||
export * from './style'; | ||
@@ -23,6 +24,6 @@ var Empty = props => { | ||
var cls = [prefixCls, className].filter(Boolean).join(' ').trim(); | ||
return /*#__PURE__*/_jsxs("div", _extends({ | ||
return /*#__PURE__*/_jsxs(EmptyWrap, _extends({ | ||
className: cls | ||
}, other, { | ||
children: [/*#__PURE__*/_jsx("div", { | ||
children: [/*#__PURE__*/_jsx(EmptyStyleIcon, { | ||
className: prefixCls + "-icon", | ||
@@ -51,6 +52,6 @@ children: icon ? icon : /*#__PURE__*/_jsxs("svg", _extends({ | ||
})) | ||
}), description && /*#__PURE__*/_jsx("div", { | ||
}), description && /*#__PURE__*/_jsx(EmptyStyleDescription, { | ||
className: prefixCls + "-description", | ||
children: description | ||
}), children && /*#__PURE__*/_jsx("div", { | ||
}), children && /*#__PURE__*/_jsx(EmptyStyleFooter, { | ||
className: prefixCls + "-footer", | ||
@@ -57,0 +58,0 @@ children: children |
{ | ||
"name": "@uiw/react-empty", | ||
"version": "4.21.14", | ||
"version": "5.0.0-bate-0", | ||
"description": "Empty component", | ||
@@ -44,4 +44,8 @@ "author": "Kenny Wong <wowohoo@qq.com>", | ||
"react": ">=16.9.0", | ||
"react-dom": ">=16.9.0" | ||
"react-dom": ">=16.9.0", | ||
"styled-components": ">=5.3.5" | ||
}, | ||
"dependencies": { | ||
"@uiw/utils": "^5.0.0-bate-0" | ||
} | ||
} |
@@ -18,8 +18,10 @@ Empty 空状态 | ||
<!--rehype:bgWhite=true&codeSandbox=true&codePen=true--> | ||
```jsx | ||
import ReactDOM from 'react-dom'; | ||
import { Empty, Button } from 'uiw'; | ||
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true | ||
import React from 'react'; | ||
import { Empty } from 'uiw'; | ||
ReactDOM.render(<Empty />, _mount_); | ||
function Demo() { | ||
return <Empty /> | ||
} | ||
export default Demo | ||
``` | ||
@@ -31,6 +33,5 @@ | ||
<!--rehype:bgWhite=true&codeSandbox=true&codePen=true--> | ||
```jsx | ||
import ReactDOM from 'react-dom'; | ||
import { Empty, Icon } from 'uiw'; | ||
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true | ||
import React from 'react'; | ||
import { Empty, Icon, Button } from 'uiw'; | ||
@@ -52,3 +53,3 @@ const Demo = () => { | ||
ReactDOM.render(<Demo />, _mount_); | ||
export default Demo | ||
``` | ||
@@ -58,8 +59,10 @@ | ||
<!--rehype:bgWhite=true&codeSandbox=true&codePen=true--> | ||
```jsx | ||
import ReactDOM from 'react-dom'; | ||
import { Empty, Button } from 'uiw'; | ||
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true | ||
import React from 'react'; | ||
import { Empty } from 'uiw'; | ||
ReactDOM.render(<Empty description={false} />, _mount_); | ||
function Demo() { | ||
return <Empty description={false} /> | ||
} | ||
export default Demo | ||
``` | ||
@@ -66,0 +69,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30374
16
309
74
4
1
+ Added@uiw/utils@^5.0.0-bate-0
+ Added@emotion/is-prop-valid@1.2.2(transitive)
+ Added@emotion/memoize@0.8.1(transitive)
+ Added@emotion/unitless@0.8.1(transitive)
+ Added@types/stylis@4.2.5(transitive)
+ Added@uiw/utils@5.0.0-bate-9(transitive)
+ Addedcamelize@1.0.1(transitive)
+ Addedcss-color-keywords@1.0.0(transitive)
+ Addedcss-to-react-native@3.2.0(transitive)
+ Addedcsstype@3.1.3(transitive)
+ Addednanoid@3.3.8(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedpostcss@8.4.38(transitive)
+ Addedpostcss-value-parser@4.2.0(transitive)
+ Addedshallowequal@1.1.0(transitive)
+ Addedsource-map-js@1.2.1(transitive)
+ Addedstyled-components@6.1.13(transitive)
+ Addedstylis@4.3.2(transitive)
+ Addedtslib@2.6.2(transitive)