react-native-styled-toast
Version:
A theme friendly, easy to use react-native toast component built using styled-components and styled-system.
45 lines • 3.4 kB
JavaScript
"use strict";
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var react_native_1 = require("react-native");
var native_1 = __importDefault(require("styled-components/native"));
var styled_system_1 = require("styled-system");
exports.systemProps = styled_system_1.compose(styled_system_1.space, styled_system_1.layout, styled_system_1.color, styled_system_1.flexbox, styled_system_1.background, styled_system_1.border, styled_system_1.position, styled_system_1.shadow, styled_system_1.opacity);
var AnimatedTouchable = react_native_1.Animated.createAnimatedComponent(react_native_1.TouchableOpacity);
exports.StyledToast = native_1.default(AnimatedTouchable)(exports.systemProps);
exports.StyledToast.defaultProps = {
py: 2,
mb: 4,
flex: 1,
zIndex: 1000,
width: '100%',
bg: 'background',
borderWidth: '1px',
borderRadius: '4px',
alignItems: 'center',
flexDirection: 'row',
accentColor: 'success',
justifyContent: 'center',
borderColor: 'border'
};
exports.Accent = native_1.default.View(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", ";\n top: 0;\n left: 0;\n bottom: 0;\n width: 4px;\n position: absolute;\n border-top-left-radius: 4px;\n border-bottom-left-radius: 4px;\n"], ["\n ", ";\n top: 0;\n left: 0;\n bottom: 0;\n width: 4px;\n position: absolute;\n border-top-left-radius: 4px;\n border-bottom-left-radius: 4px;\n"])), styled_system_1.color);
exports.Heading = native_1.default.Text(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", ";\n ", ";\n ", ";\n ", ";\n flex-wrap: wrap;\n font-weight: normal;\n"], ["\n ", ";\n ", ";\n ", ";\n ", ";\n flex-wrap: wrap;\n font-weight: normal;\n"])), styled_system_1.space, styled_system_1.color, styled_system_1.fontSize, styled_system_1.textAlign);
exports.Heading.defaultProps = {
fontSize: 2,
color: 'text'
};
exports.SubText = native_1.default.Text(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", ";\n ", ";\n ", ";\n ", ";\n flex-wrap: wrap;\n font-weight: normal;\n"], ["\n ", ";\n ", ";\n ", ";\n ", ";\n flex-wrap: wrap;\n font-weight: normal;\n"])), styled_system_1.space, styled_system_1.color, styled_system_1.fontSize, styled_system_1.textAlign);
exports.SubText.defaultProps = {
fontSize: 1,
color: 'text'
};
exports.IconCont = native_1.default.View(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", ";\n align-items: center;\n justify-content: center;\n"], ["\n ", ";\n align-items: center;\n justify-content: center;\n"])), styled_system_1.space);
exports.CloseButtonCont = native_1.default.TouchableOpacity(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", ";\n align-items: center;\n justify-content: center;\n"], ["\n ", ";\n align-items: center;\n justify-content: center;\n"])), styled_system_1.space);
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
//# sourceMappingURL=styles.js.map