UNPKG

@uiw/react-native

Version:
23 lines 669 B
import React from 'react'; import PropTypes from 'prop-types'; import { StyleSheet, Text } from 'react-native'; import { useTheme } from '@shopify/restyle'; const styles = StyleSheet.create({ default: { textDecorationLine: 'line-through' } }); export default function S(props) { const theme = useTheme(); const textColor = theme.colors.primary_text || '#ccc'; return <Text {...props} style={[styles.default, props.style, { color: textColor }]}> {props.children} </Text>; } S.propTypes = { children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node, PropTypes.string]), style: PropTypes.any }; S.defaultProps = {};