native-variants
Version:
A library for handling variants in React Native components with theme support.
29 lines • 732 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.composeText = composeText;
const textStyleKeys = [
"color",
"fontSize",
"fontWeight",
"fontStyle",
"textAlign",
"textAlignVertical",
"letterSpacing",
"lineHeight",
"textDecorationLine",
"textDecorationColor",
"textDecorationStyle",
"fontFamily",
"includeFontPadding",
"textTransform",
"writingDirection",
"textShadowColor",
"textShadowOffset",
"textShadowRadius",
];
function composeText(style) {
if (!style)
return {};
return Object.fromEntries(Object.entries(style).filter(([key]) => textStyleKeys.includes(key)));
}
//# sourceMappingURL=compose-text.js.map