Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (scrollable) {
const scrollDirection = element.getAttribute('scroll-orientation');
if (scrollDirection === 'horizontal') {
props.horizontal = true;
}
}
const component = React.createElement(
c,
props,
...Render.renderChildren(element, stylesheets, onUpdate, viewOptions),
);
return skipHref ?
component :
addHref(component, element, stylesheets, onUpdate, viewOptions);
}
}
const scrollDirection = element.getAttribute('scroll-orientation');
if (scrollDirection === 'horizontal') {
props.horizontal = true;
}
}
const component = React.createElement(
Component,
props,
...Render.renderChildren(element, stylesheets, onUpdate, viewOptions),
);
return skipHref
? component
: addHref(component, element, stylesheets, onUpdate, viewOptions);
}
}
const { element, stylesheets, onUpdate, options } = this.props;
const { skipHref } = options || {};
const imageProps = {};
if (element.getAttribute('source')) {
let source = element.getAttribute('source');
source = urlParse(source, options.screenUrl, true).toString();
imageProps.source = { uri: source };
}
const props = {
...createProps(element, stylesheets, options),
...imageProps,
};
const component = React.createElement(Image, props);
return skipHref
? component
: addHref(component, element, stylesheets, onUpdate, options);
}
}
export function text(element, stylesheets, onUpdate, options) {
const { skipHref } = options || {};
const props = createProps(element, stylesheets, options);
const component = React.createElement(
Text,
props,
...Render.renderChildren(element, stylesheets, onUpdate, options),
);
return skipHref ?
component :
addHref(component, element, stylesheets, onUpdate, options);
}