Every line of 'react native bullet list' 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.
57 renderListBullet(ordered, key, index) { 58 if (ordered) { 59 return this.renderText(index + 1 + '.', key + '_orderedList', mergedStyles.listItemNumber); 60 } 61 else { 62 return this.renderText('\u2022 ', key + '_unorderedList', mergedStyles.listItemBullet); 63 } 64 }
9 public render() { 10 return ( 11 12 13 14 ); 15 }
112 render() { 113 const { list, animated, Bullet, itemStyle, style } = this.props; 114 return ( 115 116 {list.map((value, index) => ( 117 118 ))} 119 120 ); 121 }
38 renderBullet(bullet, events) { 39 this._renderModel(bullet, events, this._bulletMap, this._createBulletView); 40 }
14 function List(_ref) { 15 var size = _ref.size; 16 var strokeColor = _ref.strokeColor; 17 var strokeWidth = _ref.strokeWidth; 18 var fillColor = _ref.fillColor; 19 var svgClass = _ref.svgClass; 20 21 var inlineStyling = { 22 fill: fillColor, 23 stroke: strokeColor, 24 strokeWidth: strokeWidth 25 }; 26 27 return _react2.default.createElement( 28 'svg', 29 { 30 xmlns: 'http://www.w3.org/2000/svg', 31 width: size, 32 height: size, 33 style: inlineStyling, 34 className: svgClass, 35 viewBox: '0 0 8 8' 36 }, 37 _react2.default.createElement('path', { d: 'M.5 0c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm1.5 0v1h6v-1h-6zm-1.5 2c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm1.5 0v1h6v-1h-6zm-1.5 2c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm1.5 0v1h6v-1h-6zm-1.5 2c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm1.5 0v1h6v-1h-6z' 38 }) 39 ); 40 }
265 value: function render() { 266 var _this$props2 = this.props, 267 currentLocale = _this$props2.currentLocale, 268 contactGroups = _this$props2.contactGroups, 269 width = _this$props2.width, 270 height = _this$props2.height; 271 var content = null; 272 273 if (width !== 0 && height !== 0) { 274 content = contactGroups.length ? this.renderList() : _react["default"].createElement(NoContacts, { 275 currentLocale: currentLocale 276 }); 277 } 278 279 return _react["default"].createElement("div", { 280 className: _styles["default"].root 281 }, content); 282 }
312 value: function renderList() { 313 var data = this.state.data; 314 var children = this.props.children; 315 316 var len = data.length; 317 if (!children) { 318 return null; 319 } 320 var lastChild = !Array.isArray(children) ? children : children[children.length - 1]; 321 var isLastChildFunc = typeof lastChild === 'function'; 322 if (!isLastChildFunc) { 323 return data.map(function (item, i) { 324 return _react2.default.cloneElement(lastChild, _extends({ 325 /* eslint-disable react/no-array-index-key */ 326 key: 'child-' + i, 327 /* selint-enable react/no-array-index-key */ 328 index: i, 329 first: i === 0, 330 last: i === len, 331 odd: odd(i), 332 data: item 333 }, item)); 334 }); 335 } 336 return data.map(function (item, i) { 337 return lastChild(item, i); 338 }); 339 }
30 render() { 31 const childrenToRender = React.Children.toArray(this.props.children).map(item => { 32 if (!item.props.value) { 33 return item; 34 } 35 const props = assign({}, item.props); 36 props.className = (props.className || '').replace('active', ''); 37 if (item.props.value === this.state.defaultValue) { 38 props.className = `${props.className} active`.trim(); 39 } 40 props.onClick = this.listOnClick.bind(this, item.props.value); 41 return React.cloneElement(item, props); 42 }); 43 return React.createElement( 44 this.props.component, 45 this.props, 46 childrenToRender 47 ); 48 }
25 var OrderedListButton = function OrderedListButton(_ref) { 26 var value = _ref.value, 27 onChange = _ref.onChange, 28 className = _ref.className, 29 style = _ref.style, 30 type = _ref.type; 31 return _react2.default.createElement( 32 _button.Button, 33 { 34 style: style, 35 type: type, 36 onClick: function onClick(e) { 37 return onChange((0, _ListUtils.orderedListStrategy)(value.change(), 'ordered-list')); 38 }, 39 className: (0, _classnames2.default)('slate-list-plugin--button', { active: (0, _ListUtils.isOrderedList)(value) }, className) 40 }, 41 _react2.default.createElement(_reactFontawesome2.default, { name: 'list-ol' }) 42 ); 43 };
25 function List(props, context) { 26 var _this = _super.call(this, props, context) || this; 27 _this.state = { ps: "creating" }; 28 return _this; 29 }