Comparing version 1.0.37 to 1.0.38
@@ -104,3 +104,4 @@ "use strict"; | ||
height: '100%', | ||
zIndex: 120 | ||
zIndex: 120, | ||
justifyContent: 'space-between' | ||
} | ||
@@ -110,5 +111,9 @@ }, React.createElement(_View.default, { | ||
backgroundColor: '#f00', | ||
height: 40, | ||
width: 100 | ||
minHeight: 40 | ||
} | ||
}), React.createElement(_View.default, { | ||
style: { | ||
backgroundColor: '#f00', | ||
minHeight: 40 | ||
} | ||
})))); | ||
@@ -115,0 +120,0 @@ }; |
@@ -9,8 +9,3 @@ export declare const Actbase: { | ||
}; | ||
defaults: { | ||
ImageElement: undefined; | ||
renderImageSource: undefined; | ||
activeOpacity: number; | ||
}; | ||
}; | ||
export default Actbase; |
@@ -14,7 +14,2 @@ "use strict"; | ||
activeOpacity: 0.8 | ||
}, | ||
defaults: { | ||
ImageElement: undefined, | ||
renderImageSource: undefined, | ||
activeOpacity: 0.8 | ||
} | ||
@@ -21,0 +16,0 @@ }; |
@@ -7,3 +7,3 @@ import * as React from 'react'; | ||
detach?: (node: ReactNode) => void; | ||
pop?: () => void; | ||
toast?: (message: string, duration: number, position: string) => void; | ||
replace?: (node: ReactNode, index: number) => void; | ||
@@ -10,0 +10,0 @@ addComponent?: (child: any) => void; |
import * as React from 'react'; | ||
import { ReactNode } from 'react'; | ||
export interface ContextArgs { | ||
styles?: any; | ||
attach?: (node: ReactNode, idx?: number | undefined) => number; | ||
detach?: (node: ReactNode) => void; | ||
toast?: (message: string, duration: number, position: string) => void; | ||
} | ||
@@ -5,0 +9,0 @@ export declare const ABContext: React.Context<ContextArgs>; |
@@ -31,8 +31,3 @@ export { Application, Providers } from './Application'; | ||
}; | ||
defaults: { | ||
ImageElement: undefined; | ||
renderImageSource: undefined; | ||
activeOpacity: number; | ||
}; | ||
}; | ||
export default Actbase; |
@@ -14,4 +14,2 @@ "use strict"; | ||
var _Actbase = _interopRequireDefault(require("../../Actbase")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -22,4 +20,3 @@ | ||
return _react.default.createElement("button", (0, _tslib.__assign)({ | ||
ref: forwardedRef, | ||
activeOpacity: _Actbase.default.defaults.activeOpacity | ||
ref: forwardedRef | ||
}, extraProps, { | ||
@@ -26,0 +23,0 @@ onClick: props.onPress || props.onClick |
@@ -25,3 +25,3 @@ "use strict"; | ||
ref: forwardedRef, | ||
activeOpacity: _Actbase.default.defaults.activeOpacity | ||
activeOpacity: _Actbase.default.Touchable.activeOpacity | ||
}, extraProps), typeof props.children === 'string' ? _react.default.createElement(_reactNative.Text, null, props.children) : props.children); | ||
@@ -28,0 +28,0 @@ }); |
export declare const useToast: () => { | ||
show: (_message: string, _duration?: number) => void; | ||
show: (message: string, duration?: number, position?: string) => void; | ||
}; | ||
export default useToast; |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -8,11 +10,24 @@ value: true | ||
// import * as React from 'react'; | ||
// import { ABContext } from '../common/utils'; | ||
var React = _interopRequireWildcard(require("react")); | ||
var _utils = require("../common/utils"); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
var useToast = function useToast() { | ||
// const context = React.useContext(ABContext); | ||
var context = React.useContext(_utils.ABContext); | ||
return { | ||
show: function show(_message, _duration) { | ||
if (_duration === void 0) { | ||
_duration = 500; | ||
show: function show(message, duration, position) { | ||
if (duration === void 0) { | ||
duration = 5000; | ||
} | ||
if (position === void 0) { | ||
position = 'bottom'; | ||
} // @ts-ignore | ||
context === null || context === void 0 ? void 0 : context.toast(message, duration, position); | ||
} | ||
@@ -19,0 +34,0 @@ }; |
{ | ||
"name": "actbase", | ||
"version": "1.0.37", | ||
"version": "1.0.38", | ||
"description": "React-Native Design Components", | ||
@@ -16,2 +16,3 @@ "main": "lib/index.js", | ||
"example": "npm run build && rm -rf ./example/reactnative/actbase && cp -r ./lib ./example/reactnative/actbase", | ||
"build": "npm run build_src && npm run build_mod", | ||
"prepublish": "npm run build_src && npm run build_mod" | ||
@@ -38,2 +39,3 @@ }, | ||
"css-to-react-native": "^2.3.2", | ||
"immer": "^7.0.14", | ||
"lodash": "^4.17.15", | ||
@@ -40,0 +42,0 @@ "prop-types": "^15.7.2" |
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
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
Sorry, the diff of this file is not supported yet
269331
243
5499
8
+ Addedimmer@^7.0.14
+ Addedimmer@7.0.15(transitive)