UNPKG

expo-custom-navigation

Version:
75 lines (74 loc) 6.77 kB
export const defaultItemStyle = (itemStyle) => { return { width: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.width, margin: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.margin, marginStart: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.marginStart, marginEnd: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.marginEnd, marginTop: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.marginTop, marginBottom: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.marginBottom, marginLeft: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.marginLeft, marginRight: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.marginRight, marginVertical: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.marginVertical, marginHorizontal: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.marginHorizontal, minWidth: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.minWidth, maxWidth: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.maxWidth, minHeight: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.minHeight, maxHeight: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.maxHeight, padding: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.padding, paddingStart: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.paddingStart, paddingEnd: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.paddingEnd, paddingTop: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.paddingTop, paddingBottom: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.paddingBottom, paddingLeft: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.paddingLeft, paddingRight: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.paddingRight, paddingVertical: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.paddingVertical, paddingHorizontal: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.paddingHorizontal, borderWidth: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.borderWidth, borderTopWidth: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.borderTopWidth, borderBottomWidth: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.borderBottomWidth, borderStartWidth: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.borderStartWidth, borderEndWidth: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.borderEndWidth, borderLeftWidth: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.borderLeftWidth, borderRightWidth: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.borderRightWidth, borderColor: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.borderColor, borderTopColor: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.borderTopColor, borderBottomColor: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.borderBottomColor, borderStartColor: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.borderStartColor, borderEndColor: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.borderEndColor, borderLeftColor: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.borderLeftColor, borderRightColor: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.borderRightColor, borderRadius: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.borderRadius, borderTopLeftRadius: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.borderTopLeftRadius, borderTopRightRadius: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.borderTopRightRadius, borderTopStartRadius: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.borderTopStartRadius, borderTopEndRadius: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.borderTopEndRadius, borderBottomLeftRadius: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.borderBottomLeftRadius, borderBottomRightRadius: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.borderBottomRightRadius, borderBottomStartRadius: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.borderBottomStartRadius, borderBottomEndRadius: itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.borderBottomEndRadius, }; }; export const defaultHeaderTitleStyle = (headerStyle) => { return { fontFamily: headerStyle === null || headerStyle === void 0 ? void 0 : headerStyle.fontFamily, fontSize: (headerStyle === null || headerStyle === void 0 ? void 0 : headerStyle.fontSize) || 20, fontStyle: headerStyle === null || headerStyle === void 0 ? void 0 : headerStyle.fontStyle, fontWeight: headerStyle === null || headerStyle === void 0 ? void 0 : headerStyle.fontWeight, letterSpacing: headerStyle === null || headerStyle === void 0 ? void 0 : headerStyle.letterSpacing, textTransform: headerStyle === null || headerStyle === void 0 ? void 0 : headerStyle.textTransform, textDecorationColor: headerStyle === null || headerStyle === void 0 ? void 0 : headerStyle.textDecorationColor, textDecorationLine: headerStyle === null || headerStyle === void 0 ? void 0 : headerStyle.textDecorationLine, textDecorationStyle: headerStyle === null || headerStyle === void 0 ? void 0 : headerStyle.textDecorationStyle, }; }; export const defaultHeaderStyle = (headerStyle) => { return { backgroundColor: headerStyle === null || headerStyle === void 0 ? void 0 : headerStyle.backgroundColor, height: headerStyle === null || headerStyle === void 0 ? void 0 : headerStyle.height, shadowColor: headerStyle === null || headerStyle === void 0 ? void 0 : headerStyle.shadowColor, shadowOffset: headerStyle === null || headerStyle === void 0 ? void 0 : headerStyle.shadowOffset, shadowOpacity: headerStyle === null || headerStyle === void 0 ? void 0 : headerStyle.shadowOpacity, shadowRadius: headerStyle === null || headerStyle === void 0 ? void 0 : headerStyle.shadowRadius, elevation: headerStyle === null || headerStyle === void 0 ? void 0 : headerStyle.elevation, }; };