@uiw/react-empty
Advanced tools
Comparing version 4.21.23 to 5.0.0-bate.2.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 |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"]; | ||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard")["default"]; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
var _exportNames = {}; | ||
exports["default"] = void 0; | ||
@@ -11,2 +13,14 @@ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2")); | ||
var _react = _interopRequireDefault(require("react")); | ||
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"); | ||
@@ -27,6 +41,6 @@ var _excluded = ["prefixCls", "className", "icon", "iconProps", "size", "description", "children"]; | ||
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"), | ||
@@ -55,6 +69,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"), | ||
@@ -67,3 +81,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'; | ||
var Empty = props => { | ||
@@ -21,6 +22,6 @@ var { | ||
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", | ||
@@ -49,6 +50,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", | ||
@@ -55,0 +56,0 @@ children: children |
{ | ||
"name": "@uiw/react-empty", | ||
"version": "4.21.23", | ||
"version": "5.0.0-bate.2.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.2.0" | ||
} | ||
} |
@@ -18,9 +18,10 @@ Empty 空状态 | ||
```jsx mdx:preview&bg=#fff | ||
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true | ||
import React from 'react'; | ||
import { Empty, Button } from 'uiw'; | ||
import { Empty } from 'uiw'; | ||
export default function Demo() { | ||
function Demo() { | ||
return <Empty /> | ||
} | ||
export default Demo | ||
``` | ||
@@ -32,8 +33,8 @@ | ||
```jsx mdx:preview&bg=#fff | ||
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true | ||
import React from 'react'; | ||
import { Empty, Button, Icon } from 'uiw'; | ||
import { Empty, Icon, Button } from 'uiw'; | ||
export default function Demo() { | ||
return ( | ||
const Demo = () => { | ||
return( | ||
<Empty | ||
@@ -51,2 +52,4 @@ description={ | ||
} | ||
export default Demo | ||
``` | ||
@@ -56,9 +59,10 @@ | ||
```jsx mdx:preview&bg=#fff | ||
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true | ||
import React from 'react'; | ||
import { Empty } from 'uiw'; | ||
export default function Demo() { | ||
function Demo() { | ||
return <Empty description={false} /> | ||
} | ||
export default Demo | ||
``` | ||
@@ -65,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
33331
16
309
74
4
1
+ Added@uiw/utils@^5.0.0-bate.2.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)