UNPKG

@hc.ds/mobile

Version:
18 lines 860 B
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } import React from 'react'; import { Text as RNText } from 'react-native'; import { TextTheme, FontSize, FontWeight } from './theme'; export const Text = ({ style, theme = 'standard', size = '14', weight = '400', testID = 'default', ...props }) => { return /*#__PURE__*/React.createElement(RNText, _extends({ style: [TextTheme.common, TextTheme[theme], FontSize[size], FontWeight[weight], style], testID: `hcds-mobile-text-${testID}` }, props), props.children); }; //# sourceMappingURL=text.js.map