UNPKG

swiftui-react-native

Version:

A React Native component library inspired by SwiftUI

37 lines 1.28 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getFont = exports.FontWeights = exports.Fonts = void 0; exports.Fonts = { largeTitle: { fontSize: 34, fontWeight: 'normal' }, title: { fontSize: 28, fontWeight: 'normal' }, title2: { fontSize: 22, fontWeight: 'normal' }, title3: { fontSize: 20, fontWeight: 'normal' }, headline: { fontSize: 17, fontWeight: 'bold' }, body: { fontSize: 17, fontWeight: 'normal' }, callout: { fontSize: 16, fontWeight: 'normal' }, subheadline: { fontSize: 15, fontWeight: 'normal' }, footnote: { fontSize: 13, fontWeight: 'normal' }, caption: { fontSize: 12, fontWeight: 'normal' }, caption2: { fontSize: 11, fontWeight: 'normal' }, }; exports.FontWeights = { regular: 'normal', bold: 'bold', heavy: '800', medium: '600', light: '500', thin: '300', ultralight: '200', semibold: '700', black: '900', }; const getFont = (font, fontSize, fontWeight, italic) => { return { ...exports.Fonts[font], ...(fontSize && { fontSize }), ...(fontWeight && { fontWeight: exports.FontWeights[fontWeight] }), ...(italic && { fontStyle: 'italic' }), }; }; exports.getFont = getFont; //# sourceMappingURL=index.js.map