@bearei/react-icon
Advanced tools
Comparing version 0.0.6 to 0.0.8
@@ -1,2 +0,1 @@ | ||
import type { HandleEvent } from '@bearei/react-util/lib/event'; | ||
import type { DetailedHTMLProps, HTMLAttributes, ReactNode, Ref } from 'react'; | ||
@@ -7,3 +6,6 @@ import type { ViewProps } from 'react-native'; | ||
*/ | ||
export interface BaseIconProps<T, E> extends Omit<DetailedHTMLProps<HTMLAttributes<T>, T> & ViewProps, ''> { | ||
export interface BaseIconProps<T = HTMLElement> extends Omit<DetailedHTMLProps<HTMLAttributes<T>, T> & ViewProps, ''> { | ||
/** | ||
* Custom ref | ||
*/ | ||
ref?: Ref<T>; | ||
@@ -34,11 +36,11 @@ /** | ||
*/ | ||
export interface IconProps<T, E> extends BaseIconProps<T, E> { | ||
export interface IconProps<T> extends BaseIconProps<T> { | ||
/** | ||
* Render the icon main | ||
*/ | ||
renderMain?: (props: IconMainProps<T, E>) => ReactNode; | ||
renderMain?: (props: IconMainProps) => ReactNode; | ||
/** | ||
* Render the icon container | ||
*/ | ||
renderContainer?: (props: IconContainerProps<T, E>) => ReactNode; | ||
renderContainer?: (props: IconContainerProps) => ReactNode; | ||
} | ||
@@ -48,16 +50,12 @@ /** | ||
*/ | ||
export interface IconChildrenProps<T, E> extends Omit<BaseIconProps<T, E>, 'ref'> { | ||
export interface IconChildrenProps extends Omit<BaseIconProps, 'ref'> { | ||
/** | ||
* The unique ID of the component | ||
* Component unique ID | ||
*/ | ||
id: string; | ||
children?: ReactNode; | ||
/** | ||
* Used to handle some common default events | ||
*/ | ||
handleEvent: HandleEvent; | ||
} | ||
export declare type IconMainProps<T, E> = IconChildrenProps<T, E>; | ||
export declare type IconContainerProps<T, E> = IconChildrenProps<T, E> & Pick<BaseIconProps<T, E>, 'ref'>; | ||
declare function Icon<T, E = React.MouseEvent<T, MouseEvent>>({ ref, renderMain, renderContainer, ...props }: IconProps<T, E>): JSX.Element; | ||
export declare type IconMainProps = IconChildrenProps; | ||
export declare type IconContainerProps = IconChildrenProps & Pick<BaseIconProps, 'ref'>; | ||
declare const Icon: <T extends HTMLElement>({ ref, renderMain, renderContainer, ...props }: IconProps<T>) => JSX.Element; | ||
export default Icon; |
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react"; | ||
/******/ var __webpack_modules__ = ({ | ||
/***/ 308: | ||
/***/ (function(__unused_webpack_module, exports) { | ||
/******/ (function() { // webpackBootstrap | ||
/******/ "use strict"; | ||
var __webpack_exports__ = {}; | ||
// This entry need to be wrapped in an IIFE because it uses a non-standard name for the exports (exports). | ||
!function() { | ||
var exports = __webpack_exports__; | ||
Object.defineProperty(exports, "__esModule", ({ | ||
value: true | ||
})); | ||
var handleEvent = function handleEvent(callback) { | ||
return function (e) { | ||
var _a, _b; | ||
(_a = e.preventDefault) === null || _a === void 0 ? void 0 : _a.call(e); | ||
(_b = e.stopPropagation) === null || _b === void 0 ? void 0 : _b.call(e); | ||
return callback === null || callback === void 0 ? void 0 : callback(e); | ||
}; | ||
}; | ||
exports["default"] = handleEvent; | ||
}(); | ||
var __webpack_export_target__ = exports; | ||
for(var i in __webpack_exports__) __webpack_export_target__[i] = __webpack_exports__[i]; | ||
if(__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, "__esModule", { value: true }); | ||
/******/ })() | ||
; | ||
/***/ }), | ||
/***/ 841: | ||
/***/ 251: | ||
/***/ (function(__unused_webpack_module, exports, __webpack_require__) { | ||
@@ -55,3 +23,3 @@ | ||
/***/ 177: | ||
/***/ 521: | ||
/***/ (function(module, __unused_webpack_exports, __webpack_require__) { | ||
@@ -62,3 +30,3 @@ | ||
if (true) { | ||
module.exports = __webpack_require__(841); | ||
module.exports = __webpack_require__(251); | ||
} else {} | ||
@@ -105,39 +73,7 @@ | ||
/************************************************************************/ | ||
/******/ /* webpack/runtime/compat get default export */ | ||
/******/ !function() { | ||
/******/ // getDefaultExport function for compatibility with non-harmony modules | ||
/******/ __webpack_require__.n = function(module) { | ||
/******/ var getter = module && module.__esModule ? | ||
/******/ function() { return module['default']; } : | ||
/******/ function() { return module; }; | ||
/******/ __webpack_require__.d(getter, { a: getter }); | ||
/******/ return getter; | ||
/******/ }; | ||
/******/ }(); | ||
/******/ | ||
/******/ /* webpack/runtime/define property getters */ | ||
/******/ !function() { | ||
/******/ // define getter functions for harmony exports | ||
/******/ __webpack_require__.d = function(exports, definition) { | ||
/******/ for(var key in definition) { | ||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | ||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | ||
/******/ } | ||
/******/ } | ||
/******/ }; | ||
/******/ }(); | ||
/******/ | ||
/******/ /* webpack/runtime/hasOwnProperty shorthand */ | ||
/******/ !function() { | ||
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } | ||
/******/ }(); | ||
/******/ | ||
/************************************************************************/ | ||
var __webpack_exports__ = {}; | ||
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. | ||
!function() { | ||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(177); | ||
/* harmony import */ var _bearei_react_util_lib_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(308); | ||
/* harmony import */ var _bearei_react_util_lib_event__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_bearei_react_util_lib_event__WEBPACK_IMPORTED_MODULE_1__); | ||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(810); | ||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(521); | ||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(810); | ||
var __rest = undefined && undefined.__rest || function (s, e) { | ||
@@ -155,5 +91,3 @@ var t = {}; | ||
function Icon(_a) { | ||
var _b; | ||
var Icon = function Icon(_a) { | ||
var ref = _a.ref, | ||
@@ -163,16 +97,18 @@ renderMain = _a.renderMain, | ||
props = __rest(_a, ["ref", "renderMain", "renderContainer"]); | ||
var id = (0,react__WEBPACK_IMPORTED_MODULE_2__.useId)(); | ||
var id = (0,react__WEBPACK_IMPORTED_MODULE_1__.useId)(); | ||
var childrenProps = Object.assign(Object.assign({}, props), { | ||
id: id, | ||
handleEvent: (_bearei_react_util_lib_event__WEBPACK_IMPORTED_MODULE_1___default()) | ||
id: id | ||
}); | ||
var main = renderMain === null || renderMain === void 0 ? void 0 : renderMain(childrenProps); | ||
var container = (_b = renderContainer === null || renderContainer === void 0 ? void 0 : renderContainer(Object.assign(Object.assign({}, childrenProps), { | ||
children: main, | ||
var content = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { | ||
children: main | ||
}); | ||
var container = renderContainer === null || renderContainer === void 0 ? void 0 : renderContainer(Object.assign(Object.assign({}, childrenProps), { | ||
children: content, | ||
ref: ref | ||
}))) !== null && _b !== void 0 ? _b : main; | ||
})); | ||
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { | ||
children: container | ||
}); | ||
} | ||
}; | ||
/* harmony default export */ __webpack_exports__["Z"] = (Icon); | ||
@@ -179,0 +115,0 @@ }(); |
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react"; | ||
/******/ var __webpack_modules__ = ({ | ||
/***/ 73: | ||
/***/ 893: | ||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | ||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(177); | ||
/* harmony import */ var _bearei_react_util_lib_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(308); | ||
/* harmony import */ var _bearei_react_util_lib_event__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_bearei_react_util_lib_event__WEBPACK_IMPORTED_MODULE_1__); | ||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(810); | ||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(521); | ||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(810); | ||
var __rest = undefined && undefined.__rest || function (s, e) { | ||
@@ -23,5 +21,3 @@ var t = {}; | ||
function Icon(_a) { | ||
var _b; | ||
var Icon = function Icon(_a) { | ||
var ref = _a.ref, | ||
@@ -31,16 +27,18 @@ renderMain = _a.renderMain, | ||
props = __rest(_a, ["ref", "renderMain", "renderContainer"]); | ||
var id = (0,react__WEBPACK_IMPORTED_MODULE_2__.useId)(); | ||
var id = (0,react__WEBPACK_IMPORTED_MODULE_1__.useId)(); | ||
var childrenProps = Object.assign(Object.assign({}, props), { | ||
id: id, | ||
handleEvent: (_bearei_react_util_lib_event__WEBPACK_IMPORTED_MODULE_1___default()) | ||
id: id | ||
}); | ||
var main = renderMain === null || renderMain === void 0 ? void 0 : renderMain(childrenProps); | ||
var container = (_b = renderContainer === null || renderContainer === void 0 ? void 0 : renderContainer(Object.assign(Object.assign({}, childrenProps), { | ||
children: main, | ||
var content = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { | ||
children: main | ||
}); | ||
var container = renderContainer === null || renderContainer === void 0 ? void 0 : renderContainer(Object.assign(Object.assign({}, childrenProps), { | ||
children: content, | ||
ref: ref | ||
}))) !== null && _b !== void 0 ? _b : main; | ||
})); | ||
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { | ||
children: container | ||
}); | ||
} | ||
}; | ||
/* harmony default export */ __webpack_exports__["Z"] = (Icon); | ||
@@ -50,35 +48,3 @@ | ||
/***/ 308: | ||
/***/ (function(__unused_webpack_module, exports) { | ||
/******/ (function() { // webpackBootstrap | ||
/******/ "use strict"; | ||
var __webpack_exports__ = {}; | ||
// This entry need to be wrapped in an IIFE because it uses a non-standard name for the exports (exports). | ||
!function() { | ||
var exports = __webpack_exports__; | ||
Object.defineProperty(exports, "__esModule", ({ | ||
value: true | ||
})); | ||
var handleEvent = function handleEvent(callback) { | ||
return function (e) { | ||
var _a, _b; | ||
(_a = e.preventDefault) === null || _a === void 0 ? void 0 : _a.call(e); | ||
(_b = e.stopPropagation) === null || _b === void 0 ? void 0 : _b.call(e); | ||
return callback === null || callback === void 0 ? void 0 : callback(e); | ||
}; | ||
}; | ||
exports["default"] = handleEvent; | ||
}(); | ||
var __webpack_export_target__ = exports; | ||
for(var i in __webpack_exports__) __webpack_export_target__[i] = __webpack_exports__[i]; | ||
if(__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, "__esModule", { value: true }); | ||
/******/ })() | ||
; | ||
/***/ }), | ||
/***/ 841: | ||
/***/ 251: | ||
/***/ (function(__unused_webpack_module, exports, __webpack_require__) { | ||
@@ -102,3 +68,3 @@ | ||
/***/ 177: | ||
/***/ 521: | ||
/***/ (function(module, __unused_webpack_exports, __webpack_require__) { | ||
@@ -109,3 +75,3 @@ | ||
if (true) { | ||
module.exports = __webpack_require__(841); | ||
module.exports = __webpack_require__(251); | ||
} else {} | ||
@@ -152,36 +118,6 @@ | ||
/************************************************************************/ | ||
/******/ /* webpack/runtime/compat get default export */ | ||
/******/ !function() { | ||
/******/ // getDefaultExport function for compatibility with non-harmony modules | ||
/******/ __webpack_require__.n = function(module) { | ||
/******/ var getter = module && module.__esModule ? | ||
/******/ function() { return module['default']; } : | ||
/******/ function() { return module; }; | ||
/******/ __webpack_require__.d(getter, { a: getter }); | ||
/******/ return getter; | ||
/******/ }; | ||
/******/ }(); | ||
/******/ | ||
/******/ /* webpack/runtime/define property getters */ | ||
/******/ !function() { | ||
/******/ // define getter functions for harmony exports | ||
/******/ __webpack_require__.d = function(exports, definition) { | ||
/******/ for(var key in definition) { | ||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | ||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | ||
/******/ } | ||
/******/ } | ||
/******/ }; | ||
/******/ }(); | ||
/******/ | ||
/******/ /* webpack/runtime/hasOwnProperty shorthand */ | ||
/******/ !function() { | ||
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } | ||
/******/ }(); | ||
/******/ | ||
/************************************************************************/ | ||
var __webpack_exports__ = {}; | ||
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. | ||
!function() { | ||
/* harmony import */ var _components_Icon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73); | ||
/* harmony import */ var _components_Icon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); | ||
@@ -188,0 +124,0 @@ |
@@ -1,2 +0,1 @@ | ||
import type { HandleEvent } from '@bearei/react-util/lib/event'; | ||
import type { DetailedHTMLProps, HTMLAttributes, ReactNode, Ref } from 'react'; | ||
@@ -7,3 +6,6 @@ import type { ViewProps } from 'react-native'; | ||
*/ | ||
export interface BaseIconProps<T, E> extends Omit<DetailedHTMLProps<HTMLAttributes<T>, T> & ViewProps, ''> { | ||
export interface BaseIconProps<T = HTMLElement> extends Omit<DetailedHTMLProps<HTMLAttributes<T>, T> & ViewProps, ''> { | ||
/** | ||
* Custom ref | ||
*/ | ||
ref?: Ref<T>; | ||
@@ -34,11 +36,11 @@ /** | ||
*/ | ||
export interface IconProps<T, E> extends BaseIconProps<T, E> { | ||
export interface IconProps<T> extends BaseIconProps<T> { | ||
/** | ||
* Render the icon main | ||
*/ | ||
renderMain?: (props: IconMainProps<T, E>) => ReactNode; | ||
renderMain?: (props: IconMainProps) => ReactNode; | ||
/** | ||
* Render the icon container | ||
*/ | ||
renderContainer?: (props: IconContainerProps<T, E>) => ReactNode; | ||
renderContainer?: (props: IconContainerProps) => ReactNode; | ||
} | ||
@@ -48,16 +50,12 @@ /** | ||
*/ | ||
export interface IconChildrenProps<T, E> extends Omit<BaseIconProps<T, E>, 'ref'> { | ||
export interface IconChildrenProps extends Omit<BaseIconProps, 'ref'> { | ||
/** | ||
* The unique ID of the component | ||
* Component unique ID | ||
*/ | ||
id: string; | ||
children?: ReactNode; | ||
/** | ||
* Used to handle some common default events | ||
*/ | ||
handleEvent: HandleEvent; | ||
} | ||
export declare type IconMainProps<T, E> = IconChildrenProps<T, E>; | ||
export declare type IconContainerProps<T, E> = IconChildrenProps<T, E> & Pick<BaseIconProps<T, E>, 'ref'>; | ||
declare function Icon<T, E = React.MouseEvent<T, MouseEvent>>({ ref, renderMain, renderContainer, ...props }: IconProps<T, E>): JSX.Element; | ||
export declare type IconMainProps = IconChildrenProps; | ||
export declare type IconContainerProps = IconChildrenProps & Pick<BaseIconProps, 'ref'>; | ||
declare const Icon: <T extends HTMLElement>({ ref, renderMain, renderContainer, ...props }: IconProps<T>) => JSX.Element; | ||
export default Icon; |
/******/ (function() { // webpackBootstrap | ||
/******/ "use strict"; | ||
/******/ var __webpack_modules__ = ({ | ||
/***/ 73: | ||
/***/ 893: | ||
/***/ (function(__unused_webpack_module, exports, __webpack_require__) { | ||
"use strict"; | ||
@@ -20,15 +20,8 @@ | ||
}; | ||
var __importDefault = this && this.__importDefault || function (mod) { | ||
return mod && mod.__esModule ? mod : { | ||
"default": mod | ||
}; | ||
}; | ||
Object.defineProperty(exports, "__esModule", ({ | ||
value: true | ||
})); | ||
var jsx_runtime_1 = __webpack_require__(177); | ||
var event_1 = __importDefault(__webpack_require__(308)); | ||
var jsx_runtime_1 = __webpack_require__(521); | ||
var react_1 = __webpack_require__(689); | ||
function Icon(_a) { | ||
var _b; | ||
var Icon = function Icon(_a) { | ||
var ref = _a.ref, | ||
@@ -40,14 +33,16 @@ renderMain = _a.renderMain, | ||
var childrenProps = Object.assign(Object.assign({}, props), { | ||
id: id, | ||
handleEvent: event_1.default | ||
id: id | ||
}); | ||
var main = renderMain === null || renderMain === void 0 ? void 0 : renderMain(childrenProps); | ||
var container = (_b = renderContainer === null || renderContainer === void 0 ? void 0 : renderContainer(Object.assign(Object.assign({}, childrenProps), { | ||
children: main, | ||
var content = (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { | ||
children: main | ||
}); | ||
var container = renderContainer === null || renderContainer === void 0 ? void 0 : renderContainer(Object.assign(Object.assign({}, childrenProps), { | ||
children: content, | ||
ref: ref | ||
}))) !== null && _b !== void 0 ? _b : main; | ||
})); | ||
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { | ||
children: container | ||
}); | ||
} | ||
}; | ||
exports["default"] = Icon; | ||
@@ -57,38 +52,5 @@ | ||
/***/ 308: | ||
/***/ (function(__unused_webpack_module, exports) { | ||
/******/ (function() { // webpackBootstrap | ||
/******/ "use strict"; | ||
var __webpack_exports__ = {}; | ||
// This entry need to be wrapped in an IIFE because it uses a non-standard name for the exports (exports). | ||
!function() { | ||
var exports = __webpack_exports__; | ||
Object.defineProperty(exports, "__esModule", ({ | ||
value: true | ||
})); | ||
var handleEvent = function handleEvent(callback) { | ||
return function (e) { | ||
var _a, _b; | ||
(_a = e.preventDefault) === null || _a === void 0 ? void 0 : _a.call(e); | ||
(_b = e.stopPropagation) === null || _b === void 0 ? void 0 : _b.call(e); | ||
return callback === null || callback === void 0 ? void 0 : callback(e); | ||
}; | ||
}; | ||
exports["default"] = handleEvent; | ||
}(); | ||
var __webpack_export_target__ = exports; | ||
for(var i in __webpack_exports__) __webpack_export_target__[i] = __webpack_exports__[i]; | ||
if(__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, "__esModule", { value: true }); | ||
/******/ })() | ||
; | ||
/***/ }), | ||
/***/ 841: | ||
/***/ 251: | ||
/***/ (function(__unused_webpack_module, exports, __webpack_require__) { | ||
"use strict"; | ||
/** | ||
@@ -109,10 +71,9 @@ * @license React | ||
/***/ 177: | ||
/***/ 521: | ||
/***/ (function(module, __unused_webpack_exports, __webpack_require__) { | ||
"use strict"; | ||
if (true) { | ||
module.exports = __webpack_require__(841); | ||
module.exports = __webpack_require__(251); | ||
} else {} | ||
@@ -126,3 +87,2 @@ | ||
"use strict"; | ||
module.exports = require("react"); | ||
@@ -163,3 +123,3 @@ | ||
/******/ // This entry module is referenced by other modules so it can't be inlined | ||
/******/ var __webpack_exports__ = __webpack_require__(73); | ||
/******/ var __webpack_exports__ = __webpack_require__(893); | ||
/******/ var __webpack_export_target__ = exports; | ||
@@ -166,0 +126,0 @@ /******/ for(var i in __webpack_exports__) __webpack_export_target__[i] = __webpack_exports__[i]; |
/******/ (function() { // webpackBootstrap | ||
/******/ "use strict"; | ||
/******/ var __webpack_modules__ = ({ | ||
/***/ 73: | ||
/***/ 893: | ||
/***/ (function(__unused_webpack_module, exports, __webpack_require__) { | ||
"use strict"; | ||
@@ -20,15 +20,8 @@ | ||
}; | ||
var __importDefault = this && this.__importDefault || function (mod) { | ||
return mod && mod.__esModule ? mod : { | ||
"default": mod | ||
}; | ||
}; | ||
Object.defineProperty(exports, "__esModule", ({ | ||
value: true | ||
})); | ||
var jsx_runtime_1 = __webpack_require__(177); | ||
var event_1 = __importDefault(__webpack_require__(308)); | ||
var jsx_runtime_1 = __webpack_require__(521); | ||
var react_1 = __webpack_require__(689); | ||
function Icon(_a) { | ||
var _b; | ||
var Icon = function Icon(_a) { | ||
var ref = _a.ref, | ||
@@ -40,14 +33,16 @@ renderMain = _a.renderMain, | ||
var childrenProps = Object.assign(Object.assign({}, props), { | ||
id: id, | ||
handleEvent: event_1.default | ||
id: id | ||
}); | ||
var main = renderMain === null || renderMain === void 0 ? void 0 : renderMain(childrenProps); | ||
var container = (_b = renderContainer === null || renderContainer === void 0 ? void 0 : renderContainer(Object.assign(Object.assign({}, childrenProps), { | ||
children: main, | ||
var content = (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { | ||
children: main | ||
}); | ||
var container = renderContainer === null || renderContainer === void 0 ? void 0 : renderContainer(Object.assign(Object.assign({}, childrenProps), { | ||
children: content, | ||
ref: ref | ||
}))) !== null && _b !== void 0 ? _b : main; | ||
})); | ||
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { | ||
children: container | ||
}); | ||
} | ||
}; | ||
exports["default"] = Icon; | ||
@@ -57,6 +52,5 @@ | ||
/***/ 790: | ||
/***/ 56: | ||
/***/ (function(__unused_webpack_module, exports, __webpack_require__) { | ||
"use strict"; | ||
@@ -93,4 +87,4 @@ | ||
})); | ||
__exportStar(__webpack_require__(73), exports); | ||
var Icon_1 = __importDefault(__webpack_require__(73)); | ||
__exportStar(__webpack_require__(893), exports); | ||
var Icon_1 = __importDefault(__webpack_require__(893)); | ||
exports["default"] = Icon_1.default; | ||
@@ -100,38 +94,5 @@ | ||
/***/ 308: | ||
/***/ (function(__unused_webpack_module, exports) { | ||
/******/ (function() { // webpackBootstrap | ||
/******/ "use strict"; | ||
var __webpack_exports__ = {}; | ||
// This entry need to be wrapped in an IIFE because it uses a non-standard name for the exports (exports). | ||
!function() { | ||
var exports = __webpack_exports__; | ||
Object.defineProperty(exports, "__esModule", ({ | ||
value: true | ||
})); | ||
var handleEvent = function handleEvent(callback) { | ||
return function (e) { | ||
var _a, _b; | ||
(_a = e.preventDefault) === null || _a === void 0 ? void 0 : _a.call(e); | ||
(_b = e.stopPropagation) === null || _b === void 0 ? void 0 : _b.call(e); | ||
return callback === null || callback === void 0 ? void 0 : callback(e); | ||
}; | ||
}; | ||
exports["default"] = handleEvent; | ||
}(); | ||
var __webpack_export_target__ = exports; | ||
for(var i in __webpack_exports__) __webpack_export_target__[i] = __webpack_exports__[i]; | ||
if(__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, "__esModule", { value: true }); | ||
/******/ })() | ||
; | ||
/***/ }), | ||
/***/ 841: | ||
/***/ 251: | ||
/***/ (function(__unused_webpack_module, exports, __webpack_require__) { | ||
"use strict"; | ||
/** | ||
@@ -152,10 +113,9 @@ * @license React | ||
/***/ 177: | ||
/***/ 521: | ||
/***/ (function(module, __unused_webpack_exports, __webpack_require__) { | ||
"use strict"; | ||
if (true) { | ||
module.exports = __webpack_require__(841); | ||
module.exports = __webpack_require__(251); | ||
} else {} | ||
@@ -169,3 +129,2 @@ | ||
"use strict"; | ||
module.exports = require("react"); | ||
@@ -206,3 +165,3 @@ | ||
/******/ // This entry module is referenced by other modules so it can't be inlined | ||
/******/ var __webpack_exports__ = __webpack_require__(790); | ||
/******/ var __webpack_exports__ = __webpack_require__(56); | ||
/******/ var __webpack_export_target__ = exports; | ||
@@ -209,0 +168,0 @@ /******/ for(var i in __webpack_exports__) __webpack_export_target__[i] = __webpack_exports__[i]; |
{ | ||
"name": "@bearei/react-icon", | ||
"version": "0.0.6", | ||
"version": "0.0.8", | ||
"main": "./lib/index.js", | ||
@@ -8,3 +8,3 @@ "types": "./lib/index.d.ts", | ||
"author": "bearei <bear_ei@outlook.com>", | ||
"description": "A basic icon component that supports react and native react.", | ||
"description": "Base icon components that support React and React native", | ||
"license": "MIT", | ||
@@ -96,3 +96,3 @@ "readmeFilename": "README.md", | ||
}, | ||
"packageManager": "yarn@3.2.4" | ||
"packageManager": "yarn@3.3.0" | ||
} |
# react-icon | ||
A basic icon component that supports react and native react. | ||
Base icon components that support React and React native | ||
@@ -5,0 +5,0 @@ ## Installation |
27299
566