10 examples of 'underline text react native' in JavaScript

Every line of 'underline text react native' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
7function extractTextFromReactComponents(component) {
8 if (component === null || component === undefined) {
9 return '';
10 }
11 if (typeof component === 'string') {
12 return component;
13 } else if (!component.props || !component.props.children) {
14 return '';
15 }
16 return '' + React.Children.toArray(component.props.children)
17 .map(child => extractTextFromReactComponents(child)).join(' ');
18}
43function Text() {
44 var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
45
46 switch (Platform.default.current) {
47 case 'alipay':
48 return React.createElement(index$1.Text, props);
49
50 case 'wechat':
51 return React.createElement(index$2.Text, props);
52
53 case 'toutiao':
54 return React.createElement(Text$1.default, props);
55 }
56}
37onClick: function onClick(e) {
38 return onChange((0, _UnderlineUtils.underlineMarkStrategy)(value.change()));
39},
18render() {
19 const {children, ...props} = this.props;
20 return React.createElement('Text', props, children);
21}
69renderText(node, key, styles) {
70 const { accessible, style, numberOfLines, ellipsizeMode } = this.props;
71 let mergestyle = merge({}, style, styles);
72 return (React.createElement(Text, { key: key, accessible: accessible, style: mergestyle, numberOfLines: numberOfLines, ellipsizeMode: ellipsizeMode }, typeof node === 'string' ? node : this.renderNode(node, key, mergestyle)));
73}
41function TextRenderer(props) {
42 return supportsStringRender ? props.children : createElement('span', null, props.children)
43}
40Text.render = function render(props, ...args) {
41 const oldProps = props;
42 let newProps = {...props, style: [defaultFontFamily.style, props.style]};
43 try {
44 return Reflect.apply(TextRender, this, [newProps, ...args]);
45 } finally {
46 newProps = oldProps;
47 }
48};
25var UnderlineButton = function UnderlineButton(_ref) {
26 var value = _ref.value,
27 onChange = _ref.onChange,
28 changeState = _ref.changeState,
29 className = _ref.className,
30 style = _ref.style,
31 type = _ref.type;
32 return _react2.default.createElement(
33 _button.Button,
34 {
35 style: style,
36 type: type,
37 onClick: function onClick(e) {
38 return onChange((0, _UnderlineUtils.underlineMarkStrategy)(value.change()));
39 },
40 className: (0, _classnames2.default)('slate-underline-plugin--button', { active: (0, _UnderlineUtils.hasMark)(value) }, className)
41 },
42 _react2.default.createElement(_reactFontawesome2.default, { name: 'underline' })
43 );
44};
20export function Text(props: TextProps) {
21 const styleProps = css(STYLE, props.style)
22 return <p>{props.children || props.text}</p>
23}
71value: function renderText() {
72 return (0, _responsive.renderResponsive)('text', _react2.default.createElement(_Text2.default, { source: this.props.text, style: {
73 width: '90vw',
74 padding: '10px',
75 paddingBottom: '60px'
76 } }), _react2.default.createElement(_Text2.default, { source: this.props.text, style: {
77 width: '70vw',
78 paddingBottom: '60px'
79 } }));
80}

Related snippets