UNPKG

rn-inkpad

Version:

<img src="https://res.cloudinary.com/fercloudinary/image/upload/v1715452841/packages/inkpad-banner_acl0xl.png" />

139 lines (138 loc) 4.46 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getStyles = void 0; const react_native_1 = require("react-native"); const getStyles = (os, dark = false, personalTheme, buttons = 2, icon = false) => { const { backgroundInputColor, cardBackgroundColor, descriptionColor, inputBorderColor, inputColor, lineColor, titleColor, } = personalTheme || {}; const ios = react_native_1.StyleSheet.create({ button: { backgroundColor: 'transparent', borderLeftColor: !!lineColor ? lineColor : dark ? '#616161' : '#C3C3C3', borderTopColor: !!lineColor ? lineColor : dark ? '#616161' : '#C3C3C3', borderTopWidth: 1, paddingVertical: 12, }, buttonsContainer: { flexDirection: buttons <= 2 ? 'row' : undefined, marginTop: 15, }, description: { color: !!descriptionColor ? descriptionColor : dark ? '#FFF' : '#000', marginTop: 8, paddingLeft: '15%', paddingRight: icon ? '12%' : '15%', textAlign: 'center', }, flex: { flex: 1, }, label: { color: '#4F87FF', fontWeight: '700', marginTop: 15, paddingHorizontal: 20, }, modalContainer: { alignItems: 'center', flex: 1, justifyContent: 'center', }, modalView: { backgroundColor: !!cardBackgroundColor ? cardBackgroundColor : dark ? '#222' : '#EEE', borderRadius: 10, paddingTop: 20, width: '90%', }, textInput: { backgroundColor: !!backgroundInputColor ? backgroundInputColor : dark ? '#1c1c1e' : '#FFF', borderColor: !!inputBorderColor ? inputBorderColor : dark ? '#616161' : '#C3C3C3', borderRadius: 10, borderWidth: 1, color: !!inputColor ? inputColor : dark ? '#FFF' : '#000', marginHorizontal: '5%', marginTop: 10, padding: 7, }, title: { color: !!titleColor ? titleColor : dark ? '#FFF' : '#000', fontSize: 17, fontWeight: '600', textAlign: 'center', }, }); const android = react_native_1.StyleSheet.create({ button: { backgroundColor: 'transparent', paddingVertical: 12, }, buttonsContainer: { flexDirection: 'row', gap: 25, justifyContent: 'flex-end', marginTop: 15, paddingHorizontal: 20, }, description: { color: !!descriptionColor ? descriptionColor : dark ? '#FFF' : '#000', marginBottom: 10, marginTop: 8, paddingLeft: 20, paddingRight: icon ? 30 : 20, }, flex: { flex: 1, }, label: { color: '#00d982', fontWeight: '700', marginTop: 15, paddingHorizontal: 20, }, modalContainer: { alignItems: 'center', flex: 1, justifyContent: 'center', }, modalView: { backgroundColor: !!cardBackgroundColor ? cardBackgroundColor : dark ? '#282F2C' : '#FFF', borderRadius: 5, paddingTop: 20, width: '90%', }, textInput: { backgroundColor: !!backgroundInputColor ? backgroundInputColor : 'transparent', borderBottomColor: !!inputBorderColor ? inputBorderColor : '#00d982', borderBottomWidth: 1.5, borderRadius: 3, color: !!inputColor ? inputColor : dark ? '#FFF' : '#000', marginHorizontal: '5%', padding: 7, }, title: { color: !!titleColor ? titleColor : dark ? '#FFF' : '#000', fontSize: 16, fontWeight: '600', marginHorizontal: 20, }, }); return os === 'ios' ? ios : android; }; exports.getStyles = getStyles;