react95-native
Version:
Refreshed Windows 95 style UI components for your React Native app
133 lines (124 loc) • 3.37 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.padding = padding;
exports.margin = margin;
exports.blockSizes = exports.builtTextStyles = exports.buildBorderStyles = exports.fontNames = void 0;
var _reactNative = require("react-native");
const fontNames = {
normal: 'MS Sans Serif',
bold: 'MS Sans Serif Bold'
};
exports.fontNames = fontNames;
const commonBorderStyle = {
borderWidth: 2
};
const buildBorderStyles = theme => _reactNative.StyleSheet.create({
focusSecondaryOutline: { ...commonBorderStyle,
borderStyle: 'dotted',
borderColor: theme.focusSecondary
},
focusOutline: { ...commonBorderStyle,
borderStyle: 'dotted',
borderColor: theme.borderDarkest
},
outline: { ...commonBorderStyle,
borderColor: theme.borderDarkest
},
defaultOuter: { ...commonBorderStyle,
borderLeftColor: theme.borderLightest,
borderTopColor: theme.borderLightest,
borderRightColor: theme.borderDarkest,
borderBottomColor: theme.borderDarkest
},
defaultInner: { ...commonBorderStyle,
borderLeftColor: theme.borderLight,
borderTopColor: theme.borderLight,
borderRightColor: theme.borderDark,
borderBottomColor: theme.borderDark
},
outsideOuter: { ...commonBorderStyle,
borderLeftColor: theme.borderLight,
borderTopColor: theme.borderLight,
borderRightColor: theme.borderDarkest,
borderBottomColor: theme.borderDarkest
},
outsideInner: { ...commonBorderStyle,
borderLeftColor: theme.borderLightest,
borderTopColor: theme.borderLightest,
borderRightColor: theme.borderDark,
borderBottomColor: theme.borderDark
},
cutoutOuter: { ...commonBorderStyle,
borderLeftColor: theme.borderDark,
borderTopColor: theme.borderDark,
borderRightColor: theme.borderLightest,
borderBottomColor: theme.borderLightest
},
cutoutInner: { ...commonBorderStyle,
borderLeftColor: theme.borderDarkest,
borderTopColor: theme.borderDarkest,
borderRightColor: theme.borderLight,
borderBottomColor: theme.borderLight
},
well: { ...commonBorderStyle,
borderLeftColor: theme.borderLightest,
borderTopColor: theme.borderLightest,
borderRightColor: theme.borderDark,
borderBottomColor: theme.borderDark
},
flat: { ...commonBorderStyle,
borderColor: theme.flatDark
}
});
exports.buildBorderStyles = buildBorderStyles;
const builtTextStyles = theme => _reactNative.StyleSheet.create({
regular: {
fontFamily: 'MS Sans Serif',
fontSize: 16
},
bold: {
fontFamily: 'MS Sans Serif Bold',
fontSize: 16
},
secondary: {
color: theme.materialTextDisabled
},
default: {
color: theme.materialText
},
disabled: {
color: theme.materialTextDisabled,
textShadowColor: theme.materialTextDisabledShadow,
textShadowOffset: {
width: 1,
height: 1
},
textShadowRadius: 0
}
});
exports.builtTextStyles = builtTextStyles;
const blockSizes = {
sm: 28,
md: 36,
lg: 44
};
exports.blockSizes = blockSizes;
function padding(a, b, c, d) {
return {
paddingTop: a,
paddingRight: b || a,
paddingBottom: c || a,
paddingLeft: d || b || a
};
}
function margin(a, b, c, d) {
return {
marginTop: a,
marginRight: b || a,
marginBottom: c || a,
marginLeft: d || b || a
};
}
//# sourceMappingURL=styles.js.map